Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 08 Mar 2004 @ 12:15:31 GMT


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


Subj:   Re: Store procedure Select into
 
From:   naresh.x.mudunuru

I believe this is true with normal SELECT statement also and that's what carried it to SELECT-INTO statement. According to the syntax provided in the SQL reference manual we need to have Where clause after From clause. But the following stmts work fine.

 BTEQ -- Enter your DBC/SQL request or BTEQ command:
sel * from t2 where f1>=100;

sel * from t2 where f1>=100;

 *** Query completed. One row found. 2 columns returned.
 *** Total elapsed time was 1 second.

         f1           f2
-----------  -----------
        100          200

 BTEQ -- Enter your DBC/SQL request or BTEQ command:
sel * where f1>=100 from t2;

sel * where f1>=100 from t2;

 *** Query completed. One row found. 2 columns returned.
 *** Total elapsed time was 1 second.

         f1           f2
-----------  -----------
        100          200

Though no where documented, the reason I believe is that in Teradata SQLs like "select date where date>=current_date;" are allowed with out FROM Clause. So Teradata parser may not mind the order of FROM/WHERE clauses.


Thanks,

Naresh



     
  <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