Click to See Complete Forum and Search --> : sqloader decode


vennai
02-20-2003, 05:06 PM
HI,
I am using sqlloader to load the date.In one of the columns i need to decode the data.I havent done this before.when i use the following code i am getting error.pl.help me

bank_balance "decode(065,'Single Comprehensive',062,'Family Basic',061,'Single Basic')"


BANK_BALANCE IS 65 THEN I HAVE TO INSERT 'Single Comprehensive',if it is 62 then 'Family Basic' or if it is 61 then 'Single Basic'

LOAD DATA
INFILE 'c:\textfiles\ppst24dat.dat'
insert inTO TABLE temp_decode_b5
FIELDS TERMINATED BY "|"
( EMP_SSN POSITION (02:10),
BANK_BALANCE"decode(065,'Single Comprehensive',062,'Family Basic',061,'Single Basic')" POSITION (12:14),
PL_BEGIN_DT POSITION (16:23) date "MM/DD/YYYY"

)

LKBrwn_DBA
02-20-2003, 05:30 PM
Tyr this:

BANK_BALANCE "decode(:BANK_BALANCE,065,'Single Comprehensive',062,'Family Basic',061,'Single Basic')" POSITION (12:14),

:cool: