DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: sqloader decode

  1. #1
    Join Date
    Aug 2001
    Posts
    35

    sqloader decode

    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"

    )

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492
    Tyr this:

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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width