Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 25 Jul 2007 @ 20:20:39 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


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



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023