Archives of the TeradataForum
Message Posted: Wed, 12 Feb 2003 @ 11:27:53 GMT
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
|