|
|
Archives of the TeradataForum
Message Posted: Wed, 18 Jul 2012 @ 08:59:21 GMT
Subj: | | Re: Select records with valid values except the key field |
|
From: | | Manti, Jayarajesh |
Hi Vinod,
HASHROW(field1,field2,field3) gives 00-00-00-00 (BYTE datatype) if all the three fields are NULLs And you need to compare this with BYTE 00-00-
00-00, which is the result of HASHROW(NULL).
Here is the SQL.
SELECT
FAX_NB
, SCHB_1
, SCHB_2
, SCHB_3
, SCHB_4
, SCHB_5
FROM DATABASE.TABLE_NAME
WHERE HASHROW(NULL) <> HASHROW(SCHB_1, SCHB_2, SCHB_3, SCHB_4, SCHB_5)
Thanks,
Jay
| |