|
|
Archives of the TeradataForum
Message Posted: Mon, 06 Oct 2008 @ 21:36:44 GMT
Subj: | | Re: BTEQ Export - concatenating null values |
|
From: | | Michael Larkins |
Schabek:
It is a fact that concatenating a null will result in a null the same as doing math with a null will yield a null result. Have you ever heard
of COALESCE? Its job is to convert a null value to something that is not null.
Try this one:
SELECT COALESCE('A',' ')||';'||COALESCE('A',' ')||';'||COALESCE('A',' ')||';'
||COALESCE(NULL,' ')||';'||COALESCE('A',' ')||';'||COALESCE('A',' ')||';'
||COALESCE('A',' ')||';'||COALESCE('A',' ')||';'||COALESCE('A',' ')||';'
||COALESCE('A',' ')||';'||COALESCE('A',' ')
(TITLE '')
Hope this helps,
Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor
| |