Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 02 Jun 2009 @ 19:35:11 GMT


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


Subj:   Insert values into a volatile table
 
From:   Zhong, Hui

Hi,

I have the following sample table (DPT) and am trying to insert the values into the created volatile table except for "Budget_Last_Yr" column using Teradata SQL Assistance.

Sample data

     DPT id    DPT Name             Budget    Budget_Last_Yr   Buget_Increace_Rate
          1    Computer Science     80,000            63,600                20.50%
          2    Agriculture         100,000            79,500                10.25%

I've created the following volatile table.

     CREATE SET VOLATILE TABLE DPT, NO FALLBACK ,
        CHECKSUM = DEFAULT,
        LOG
        (
           DPT_id CHAR(3),
           DPT_Name CHAR(50) CHARACTER SET LATIN NOT CASESPECIFIC,
           Buget(9,2),
           Buget_Increace_Rate percent(2)
        )
     PRIMARY INDEX ( Transit )
        ON COMMIT   PRESERVE ROWS;

After running, it gives me 3707: Syntax error. If I change the "percent" to be "decimal", it's fine.

But how can I import the all the columns except for Budget_Last_Yr? It seems that Teradata only allows to import text files. Here's the syntax I used; it didn't work.

     INSERT INTO DPT(DPT_id, DPT_Name, Budget, Buget_Increace_Rate)
     VALUES (?,?,?,,?);

Would someone help me with using the "percent" as a data type and how to insert the data with skipping a column? Any help will be appreciated.


Thank you!

Hui



     
  <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