Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    110

    Unanswered: IQ 12.4 - Load Statement

    I am trying to create a stored proc in IQ 12.4.2 that loads a table. The sp goes along the following lines.

    CREATE PROC load_tbl_a(in @input_file varchar)

    BEGIN

    load table a
    (
    col_1 '\x0d\x0a'
    )
    FROM @input_file
    ESCAPES off
    QUOTES off
    ;
    END

    The goal is to allow the input file to be passed to the stored proc. However IQ doesn't seem to like this. It only seems to accept hardcoded file paths such as:

    load table a
    (
    col_1 '\x0d\x0a'
    )
    FROM 'C:\\inputfile.dat'

    Does anyone know of a way I can achieve passing the filename to the stored proc?

  2. #2
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    110

    Re: IQ 12.4 - Load Statement

    I worked it out.. An execute immediate will do the trick. thanks anyways


    Originally posted by bmalar
    I am trying to create a stored proc in IQ 12.4.2 that loads a table. The sp goes along the following lines.

    CREATE PROC load_tbl_a(in @input_file varchar)

    BEGIN

    load table a
    (
    col_1 '\x0d\x0a'
    )
    FROM @input_file
    ESCAPES off
    QUOTES off
    ;
    END

    The goal is to allow the input file to be passed to the stored proc. However IQ doesn't seem to like this. It only seems to accept hardcoded file paths such as:

    load table a
    (
    col_1 '\x0d\x0a'
    )
    FROM 'C:\\inputfile.dat'

    Does anyone know of a way I can achieve passing the filename to the stored proc?

Posting Permissions

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