John wrote:
Hi
I have a table of job ids and dates. What query will get me the job id of
the earliest job after yesterday i.e. a job that is either today, or if
there is no job today, a job that is as soon as possible after today.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
You may wish to try:
SELECT job_id
FROM table_name As j
WHERE job_date = (SELECT MAX(job_date) FROM table_name
WHERE job_date <= Date() )
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQhlN1IechKqOuFEgEQK1wwCfYJ6K9kriKnQ1QMr9lOS5mb qdna0An2hq
AEx6LU7spglFv9Iv2kfL704c
=dDjl
-----END PGP SIGNATURE-----