|
|
Archives of the TeradataForum
Message Posted: Thu, 13 Jun 2002 @ 15:02:14 GMT
Subj: | | Re: Unexplained Error 3569 |
|
From: | | Glen Blood |
Clay,
The problem is in the use of columnA in the output column list for your two derived tables. It is probably getting confused as to which
columnA you are talking about.
If you change it to:
SELECT TableB.*
FROM TableB
, (
SELECT MAX(SUBSTR(ColumnA,1,1)) || (MAX((SUBSTR(ColumnA,2,2)
(INTEGER))) (FORMAT '99'))
FROM TableB
WHERE SUBSTR(ColumnA,1,1) = 'C'
) maxrever (Columnd1)
, (
SELECT MAX(SUBSTR(ColumnA,1,1)) || (MIN((SUBSTR(ColumnA,2,2)
(INTEGER))) (FORMAT '99'))
FROM TableB
WHERE SUBSTR(ColumnA,1,1) = 'C'
) prirever (Columnd2)
It works fine.
| |