Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 29 Sep 2004 @ 14:51:43 GMT


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


Subj:   SELECT syntax error
 
From:   Reddy, Gayathri

I am fairly new to Teradata database .

I have to join 3 tables . Inner join of a and b and the result should be left outer joined with C . It is showing some syntax error in the last 2 statements :

1) In cast statement

2) Expecting something between b and '.'


     Select
     a.account_number,
     a.statement_date,
     b.associate_number
     coalesce(c.source,28)
     from lv_charge_off a, lv_snapshot_all b
     left outer join lv_mcacct_sol_xref c
     on a.account_number = c.account_number
     where
     a.account_number = b.account_number
     and
     CAST(CAST(a.statement_date AS DATE FORMAT 'YYYYMM') AS CHAR (6)) = CAST
     (200408 AS CHAR(6)) ;


     
  <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: 27 Dec 2016