|
|
Archives of the TeradataForum
Message Posted: Wed, 25 Jul 2007 @ 20:20:39 GMT
Subj: | | Re: UPDATE, SET, & Subquery Re-visited |
|
From: | | Castelli Emanuel Alejandro |
Hi, I don't know if you can use a Volatile table in your script, but, if you can, you should do something like this:
insert into VOLATILE_TABLE
SELECT
COUNT(1) TOTAL_COLUMN
FROM
TABLE_OF_MISMATCHES;
UPDATE A
FROM
SUMMARY_TABLE A,
(select max(TOTAL_COLUMN) as TOTAL_COLUMN FROM VOLATILE_TABLE) B
SET TOTAL_COLUMN = B.TOTAL_COLUMN ;
I googled for and update without a from clause form 2 or more tables... but I didn't find it. I think that you must choice between this
option or the option you posted...you can escape from this two options.
Bye.
Castelli, Emanuel Alejandro
Desarrollo DataWarehouse - IBM Argentina
| |