Results 1 to 3 of 3

Thread: SQL Loader

  1. #1
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3

    Unanswered: SQL Loader

    Hi,

    I got two problems with SQL Loader.

    1. The Where clause:

    WHEN (1)= '1' AND (143:150) = 'M***103'

    I want to load everything where position 143:150 is like M***103. The stars can be any sign, but only three positions are allowed there, no less, no more. I tried with Like 'M%103', but SQL Loader says: only = and <> allowed.

    2.

    I have a data file where the date is situated in the header. But i want to get this date into every line that i load from the file.

    Anyone got an idea?

    The important part of the control file:

    Load DATA
    TRUNCATE
    INTO TABLE SALES_INCOMING_STAGING
    WHEN (1)= '1' AND (143:150) = 'M***103'
    (
    TXDATE POSITION(4:9) Date 'YYMMDD',
    )
    Last edited by Milamber; 03-10-06 at 06:54.

  2. #2
    Join Date
    Jan 2005
    Location
    Green Bay
    Posts
    201
    Try some thing like this

    WHEN (1)= '1' AND (143) = 'M' and (147:149) = 'M***103'

    I fixed you position 143:150 is 8 characters not 7

    not certain what second part is asking.

    try this web-site
    http://www.lc.leidenuniv.nl/awcourse...96652/ch06.htm

  3. #3
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3
    Thanks, i figured the first part out in the mean time .

    The second part is proving a little harder, i think i'll have to do some post-processing after the data load to get it right.


    Quote Originally Posted by rbackmann
    Try some thing like this

    WHEN (1)= '1' AND (143) = 'M' and (147:149) = 'M***103'

    I fixed you position 143:150 is 8 characters not 7

    not certain what second part is asking.

    try this web-site
    http://www.lc.leidenuniv.nl/awcourse...96652/ch06.htm

Posting Permissions

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