Archives of the TeradataForum
Message Posted: Tue, 24 Feb 2004 @ 13:13:15 GMT
| Subj: || || Re: Intense Query question |
| From: || || de Wet, Johannes M |
I may be missing something here, but will something like this work for you?
WHEN MAX(A.Acct_Status_Cd) NE MIN(A.Acct_status_cd) THEN
WHEN MAX(A.Acct_Status_Cd) = 'A' THEN 'Active only'
WHEN MAX(A.Acct_Status_Cd) = 'C' THEN 'Cancelled only'
C.Product_cd = P.Product_Cd
P.Account_No = A.Account_No
c.product_cd = p.product_cd
and p.account_no = A.account_no
GROUP BY 1
ORDER BY 1;
Johannes de Wet