Re: complex SQL ?
Date: Sat, 13 Dec 2008 19:29:29 GMT
> SQL question
> If I have a table like that
> ID | ESTIMATED_VAL | REAL_VAL
> xyz | 100 | 129
> abc| 110 | 80
> I want a query that returns all underestimated values, so:
> if ESTIMATED_VAL < REAL_VAL return ID
> Something like that. Do you know how to write the SQL query?
SELECT ID FROM MyTableName (not supplied) WHERE ESTIMATED_VAL < REAL_VAL
Unless I've missed something, this is quite easy.
--Received on Sat Dec 13 2008 - 13:29:29 CST