|
|
Archives of the TeradataForum
Message Posted: Mon, 30 Sep 2002 @ 14:56:06 GMT
Subj: | | Re: Data transposition |
|
From: | | Jon Downs |
sorry that should have read:
SELECT T4.ACCOUNTNO AS ACCOUNT_NUMBER
,TRIM(T1.PHONE) AS PHONE1
,TRIM(T2.PHONE) AS PHONE2
,TRIM(T3.PHONE) AS PHONE3
FROM VIEWDB.ACCOUNT T4
LEFT OUTER JOIN VIEWDB.ACCPHONE T1
ON T4.ACCOUNTNO = T1.ACCNO
AND T1.PHONETYPE = 1
LEFT OUTER JOIN VIEWDB.ACCPHONE T2
ON T4.ACCOUNTNO = T2.ACCNO
AND T2.PHONETYPE = 2
LEFT OUTER JOIN VIEWDB.ACCPHONE T3
ON T4.ACCOUNTNO = T3.ACCNO
AND T3.PHONETYPE = 3
;
| |