How to format threaded functions in SQLLDR?

From: Shirley <isssc0_at_yahoo.com>
Date: 6 May 2003 15:48:46 -0700
Message-ID: <26a20c8a.0305061448.2c12412b_at_posting.google.com>



In SQLLDR, I want to assign a value to column BATCH_NUM where either FST_NAME or LAST_NAME = '* UNKNOWN *' or blanks, then assign it to "(TRUNC((:ROW_ID-1) /50 +5001)", else I want to assign it a value of ROW_ID + 660000.

How do I do that? I tried the decode function, but failing on syntax error. Also, the decode function only allows me to evaluate one field and not both. Is there something else I can use?

ROW_ID       SEQUENCE(1),
FST_NAME     POSITION(279:293) "decode(:FST_NAME, '* UNKNOWN *',

'REJECT', '', 'REJECT', :FST_NAME)",

LAST_NAME POSITION(294:313) "decode(:LAST_NAME, '* UNKNOWN *',
'REJECT', '', 'REJECT', LAST_NAME)",

BATCH_NUM "(decode(FST_NAME, 'REJECT', ROW_ID + 660000, "(TRUNC((:ROW_ID-1) /50 +5001)))")" thanks,
Shirley Received on Wed May 07 2003 - 00:48:46 CEST

Original text of this message