|Subject:||Selecting from joined tables (simple question)|
|Date:||29 Jan 2004|
Thanks for help with this one
I have 2 tables
DATA_STANDARD with columns ID and VALUE
DATA_EXTRA with column DS_ID and EXTRA_VALUE
The idea is that extra information is stored in the DATA_EXTRA table
How do I select all values from DATA_STANDARD where there is either no
entry in DATA_EXTRA or EXTRA_VALUE is zero.
something like this?
select ds.id from DATA_STANDARD ds, DATA_EXTRA de
( ds.id not in ( select DS_ID from DATA_EXTRA ) )
( ds.id = de.DS_ID )
( de.extra_value is null )
Why is this wrong?