sqlldr - look up on table to find column value
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: sqlldr - look up on table to find column value

  1. #1
    Join Date
    May 2009
    Posts
    3

    sqlldr - look up on table to find column value

    Hi,

    I am loading table Emp using sqlldr. I need to populate the column Date_paid_key of table Emp by lookin up on another table dates. Sample data is as given below. How can I do it using sqlldr? I can load my csv in a temp table and then proceed. Any other suggestions?

    Src.csv
    EmpId EmpName Salary Date_paid
    1 A 10 4/15/2009
    2 B 20 4/18/2009

    lookup Table dates
    Date Date_key
    4/15/2009 1001
    4/16/2009 1002
    4/17/2009 1003
    4/18/2009 1004

    Target table Emp
    EmpId EmpName Salary Date_paid_key
    1 A 10 1001
    2 B 20 1004
    Last edited by nidi_03; 05-18-2009 at 02:10 PM.

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    No other suggestion, this is a two steps process: a) sqlload what you have, b) update as needed.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Apr 2006
    Posts
    377
    May be able to consider External Tables.

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