Re: complex SQL ?

From: Paul Linehan <plinehan_at_see.my.sig>
Date: Sat, 13 Dec 2008 19:29:29 GMT
Message-ID: <t2U0l.27691$j7.489923@news.indigo.ie>

Jazz wrote:

> SQL question
> If I have a table like that
> ID | ESTIMATED_VAL | REAL_VAL
 
> xyz | 100 | 129
> abc| 110 | 80
 

> etc...
 

> 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.

Paul...

-- 
Received on Sat Dec 13 2008 - 13:29:29 CST

Original text of this message