Re: AAARRRGGG! QUERY HELP!!!!
Posted in 1996
Blair Maddock wrote:
>
> I have two tables that I need to compare. Table A and Table B.
>
> Two columns in A and two columns in B share similar values. I want to
> extract all A entries where the A columns
> are not in the B table colums.
> e.g. Table A has a record with 1,3 (columnc,columnd) in the two columns.
> Table B has 1,2 and 1,4 but no 1,3 as values from those two columns. I
> tried the following:
>
> select A.columnc,Acolumnd
> where A.columnc Not In
> (select B.columnc from B)
> and
> A.columnd Not In
> (select B.columnd from B)>
This is untested, but should work:
select A.columnc,Acolumnd
where A.columnc || A.columnd Not In
(select B.columnc || B.columnd from B)
//////////////// =======================================================
////////// // Dennis J. Pimple Informix Software, Inc.
////// / /// Principal Consultant 5299 DTC Blvd Suite 740
///// // //// dennisp@informix.com Englewood CO 80111
//// // /////
/// // ////// recept: 303-850-0210
// // /////// direct: 303-740-5611 Opinions expressed are mine,
/ /////////// fax: 303-843-6408 and do not necessarily
//////////////// http://www.informix.com reflect those of my employer