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

Thread: sql loader loading to several tables

  1. #1
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    hi

    anyone know if it´s possible to load data into several tables in the database using a single control file in 8.1.7 Enetrprise Tru64?


    Cheers

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Sure, something like:
    Code:
    LOAD DATA
    INFILE      'vendors.dat'
    BADFILE     'vendors.bad'
    DISCARDFILE 'vendors.dsc'
    
    REPLACE
    
    INTO TABLE vendors 
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
       ( vendor_type_lookup_code "RTRIM(:vendor_type_lookup_code)",
         vendor_name             "RTRIM(:vendor_name)",
         num_1099                "RTRIM(:num_1099)",
         process_status CONSTANT 'PENDING'
       )
    INTO TABLE vendor_contacts
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
       ( vendor_site_code "SUBSTR(:vendor_site_code, 1, 15)",
         first_name       CHAR(15) "RTRIM(:first_name)",
         middle_name      CHAR(15) "RTRIM(:middle_name)",
         last_name        CHAR(20) "RTRIM(:last_name)",
         org_id CONSTANT 3,
         process_status CONSTANT 'PENDING'
       )
    Jeff Hunter

  3. #3
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    cheers

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