Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 18 Jul 2005 @ 12:02:12 GMT


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


Subj:   Re: SQL Error: expecting something between ( and the select word
 
From:   Victor Sokovin

  Am trying to run the query below but its giving me an error saying "expecting something between ( and the select word"  


          > select x
          >      ,count(x)
          >
          > from x
          >
          > where date BETWEEN ( Select Max(rec_date) from y) and ( Select
          > add_months(Max(rec_date + 1), -3) - 1 from y)
          > + 1), -3) - 1 from A_AFRICA_BASE.accounts)
          >
          > group by 1
          > order by 1;

Perhaps it's only me but I cannot understand this query.

How many SELECTs are here? 3.

How many FROMs? 4

Now, TD's SELECT does not require a FROM but I thought any FROM still requires a SELECT, no? Could this be a part of the problem?


Regards,

Victor



     
  <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