Yes, you can create a Smart Collection for these images. The process is no difficult but could take a little time to complete.
Lightroom's Smart Collections exported definitions are simple text files. They are not difficult to dissect and recreate at all. Based on your description I would create a Smart Collection in Lightroom with the selection being that the filename contains "p2000518.jpg" or "p2000549.jpg" after that you could export the Smart Collection settings and open the resulting .smcol file in a text editor. It will likely look like this:
s = {
id = "15D46923-B382-4322-A3B9-19347EBF7080",
internalName = "File Name Selection",
title = "File Named",
type = "LibrarySmartCollection",
value = {
{
criteria = "filename",
operation = "any",
value = "p2000518.jpg",
value2 = "",
},
{
criteria = "filename",
operation = "any",
value = "p2000549.jpg",
value2 = "",
},
combine = "union",
},
version = 0,
}
You can then continue the pattern using copy and paste or a mail merge in your word processing program. I also delete the ID number and when it reimports it worked file. I created 132 rules to do smart collections by month for the past decade and it worked no problem. Since you said you had already gone into the SQL database I figure this idea should make sense. If you need more information let me know and I can flush it out more.