Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2006
    Posts
    3

    Unanswered: SQL loader question

    I have a question regarding SQL loader control script to load multiple tables.

    The problem is it evaluates the when clause for the first table but does not load data for the second table.

    I made changes to the code by putting in positions and it works perfectly fine.

    Can somebody please tell me if its the issue with a common terminator or is there another way of doing it.

    This is the control file
    LOAD DATA
    INFILE'Sam_data.txt'
    BADFILE'BAD_FILE.TXT'
    TRUNCATE
    INTO TABLE SAM
    WHEN MP_RECORD_TYPR='D'
    FIELDS TERMINATED BY "|"
    (
    MP_RECORD_TYPR ,
    MP_PLACE)

    INTO TABLE SAM_SAM
    WHEN MP_RECORD_TYPR='H'
    FIELDS TERMINATED BY "|"
    (
    MP_RECORD_TYPR ,
    MP_PLACE)


    Looking forward to a solution to this code which has been troubling me for hours now.

  2. #2
    Join Date
    May 2006
    Posts
    132
    Last edited by ebrian; 05-02-06 at 15:44.

Posting Permissions

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