Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Sat, 04 Oct 2008 @ 20:04:34 GMT


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


Subj:   Re: Create table as "select statement"
 
From:   Michael Larkins

Oscar:

Since dates with dashes or slashes in them need to be enclosed in a quote, that might be your problem. Otherwise the system thinks you are trying to do subtraction or division math.

Try this:

     CREATE TABLE AP2.PRCHSUMM AS
       ( select
     t.cust_id,'''20||substr(rpt_dt,1,2)||'-'||substr(rpt_dt,3,2)||'-01''' as
     RPT_DT, ...

Regards,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <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: 28 Jun 2020