|
|
Archives of the TeradataForum
Message Posted: Tue, 10 Feb 2009 @ 21:22:56 GMT
Subj: | | Re: Multiload SQL and Case statement |
|
From: | | Pinti, Michele A |
| The first thing I would recommend that you do is compare apples with apples. Besides, what day of the month is '1_' and how can you keep
that one? | |
We want to keep the record but set this field to a null if it is invalid.
| Regardless, you are comparing a two-byte char field out of SUBSTR with a number and making MLoad do a conversion. If you are
comparing wouldn't a better comparison be BETWEEN '01' and '31' for day and '01' and '12' for month? | |
I tried this case statement but records with invalid values are still being dropped.
, Case when :USAGE_YEAR_BEG_VAL_DY between '00' and '31'
then :USAGE_YEAR_BEG_VAL_DY
else null
End
, case when :USAGE_YEAR_BEG_VAL_MO between '00' and '12'
then :USAGE_YEAR_BEG_VAL_MO
else null
End
Thanks,
Michele
| |