Tom Deblauwe <[EMAIL PROTECTED]> wrote:
I have this situation where I have 3 disks, and every disk contains a
database, and each of those databases has the same structure: ID,
TimeFrom, TimeTo, Events

I would like to do a query on all 3 databases, where I check the
bitmask of 'Events' for a certain value and sort the results in ascending order based on TimeFrom.

select ID, TimeFrom, TimeTo, Events
   from db1.tableName where Events=:event
union all
select ID, TimeFrom, TimeTo, Events
   from db2.tableName where Events=:event
union all
select ID, TimeFrom, TimeTo, Events
   from db3.tableName where Events=:event
order by TimeFrom;

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to