Re: Exception Report
Posted in 1992
In-Reply-To: <2631@abcom.ATT.COM> mdb@abcom.ATT.COM (3030 )
TITLE: Re: Exception Report
In <2631@abcom.ATT.COM> mdb@abcom.ATT.COM (3030 ) writes:
> I need help with an INFORMIX ace report.
>
> I have a table which contains raw data and a table which contains valid
> values for one of the columns column.
>
> What I need to be able to do is be able to identify all rows which do not
> have a corresponding value in my look up table (i.e. exception report).
Assume tab_a is the main table and tab_b is the 'validation' table.
Also assume tab_b has only one column, and column key in tab_a is
the column to be matched against. Your select should look something
like this:
select * from tab_a
where key not in (select * from tab_b)
This works by first selecting all the values from tab_b and puts them
into a set it the selects all rows where the value of the column is
not in the set.
Hope this helps.
--
"I can't think of a witty original .sig"
stuart@cix.clink.co.uk Tel +44 778 426444
[Stuart Hemming]