Page 1 of 1

SQL/SPUFI Question - 2 refs to same table

PostPosted: Sun May 23, 2010 7:52 am
by dp3546dp3546
I have tables A and B from an old system and tables D and E from a new system. They both use table C.

I already show the old name (C.NAME). How can I get this SQL (using SPUFI) to also show then new name (C2.NAME)?

SELECT A.CONTRACT, -- OLD CONTRACT
C.NAME -- OLD NAME
FROM TABLEA A,
TABLEB B,
TABLEC C
WHERE ...
...
AND A.CONTRACT IN(
SELECT D.OLD_CONTRACT
FROM TABLED D,
TABLEE E,
TABLEC C2
WHERE ...
...
AND C.NAME ^= C2.NAME) -- OLD NAME DOES NOT MATCH NEW NAME
;

Re: SQL/SPUFI Question - 2 refs to same table

PostPosted: Tue May 25, 2010 1:56 pm
by GuyC
SELECT A.CONTRACT, -- OLD CONTRACT
C.NAME -- OLD NAME
FROM TABLEA A,
TABLEB B,
TABLEC C,
TABLED D,
TABLEE E,
TABLEC C2
WHERE ...
...
and a.contract = d.contract
AND C.NAME ^= C2.NAME