I have five tables in my database, there are actually NO common fields
between them, not even a KEY or ID or anything like that, except for
the "body" of a blob field. and that text is not identical, just a
portion of that text is identical.
each table has 5 fields, all different except the blob, which is
called "message", so normally I use something like:
select * from table1 where message like '%apple%';
to query this table, and the same goes for table 2, except the blob is
different, table 2 normally is like this:
select * from table2 where message like '%customerid=453%';
It's impossible to change the data in these fields (which would be the
best option), but there is one common element between them in the
message blob.
What I want to do is something like this:
select * from table1, table2 where message like '%order=100%';
however only one table will have that order, either table1 or table2,
but never both, and theres no way to tell which of the tables will
actually have the text.
In other words, I want to search a bunch of tables for common text
without having to actually submit the query five times, because the
list of elements to search is about 25,000 items... I'd rather submit
25,000 queries than 125,000 queries...
Yes I know its a stupid design, but it's stuck....
anyone got any workable ideas/suggestions?
B.