Happy Neew Year to all.
Can Anybody help me with next.
I Have Two Tables. TableA and TableB. In TableA each row have 4 fields :
1) DATETIME
2) X
3) Y
4) ID
in TableB 4 fileds too.
1)ID
2) START_TIME
3) END_TIME
4)CLIENT_ID
I need to select all rows from table A and Add to result rows 1 field TableB.CLIENT_ID
next rule must be used to pick CLIENT_ID for each TableA row :
SELECT CLIENT_ID FROM TableB WHERE TableA.DATETIME BETWEEN TableB.START_TIME and TableB.END_TIME
Is it possible to generate such query
thanks in advance

Help in Generate Specefic Sql Query
cropcircles
Is it imposible
or i'm give not full info
careywalker
HiddenSphinx
It is not clear exactly what you are trying to accomplish. Are the table related If so, you can join the tables together through JOIN. If you want the result set from one table to be joined to another table, then you might use a UNION. There are other types of queries that might work, but without more info, I can be more helpful.
Peter