Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 12 Feb 2003 @ 11:27:53 GMT


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


Subj:   Re: I'm stumped...case logic on a left join subquery vs. case logic on a select query
 
From:   Dieter N�th

Fred W Pluebell wrote:

  The real question in my mind is why the first query works. I believe your problem is that LENGTH(...) isn't a standard SQL function. Instead of LENGTH(pc.postl_cd)=9 use something like CHARACTER_LENGTH(TRIM(TRAILING FROM pc.postl_cd)) =9  



LENGTH is ODBC-SQL and when you check "Allow use of ODBC SQL Extension in queries" in QueryMan's query options, the ODBC driver will replace LENGTH with CHARACTERS automatically.

There's no extra SQL-feature available in ODBC, but if you start working with e.g. MONTH(datecol) instead of EXTRACT you're getting used to it and then you wonder why the query returns a syntax error running in BTEQ or a different QueryMan ;-)


Dieter



     
  <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