Subject | SQL question |
---|---|
Author | Lee Jenkins |
Post date | 2003-10-20T16:01:59Z |
Is this ok?
SELECT MyRec, MyRec1 FROM MyRecTable WHERE MyDateField IN
(SELECT OtherDate FROM OtherTable WHERE
(OtherDate >= '1/1/2003 00:00:00')
AND
(OtherDate <= '12/31/2003 00:00:00'))
ORDER BY
MyDateField
Or should I use a Join if possible?
Thanks,
Lee
SELECT MyRec, MyRec1 FROM MyRecTable WHERE MyDateField IN
(SELECT OtherDate FROM OtherTable WHERE
(OtherDate >= '1/1/2003 00:00:00')
AND
(OtherDate <= '12/31/2003 00:00:00'))
ORDER BY
MyDateField
Or should I use a Join if possible?
Thanks,
Lee