Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2011

    Unanswered: Loading Informix from Windows text file

    I need to know the complete syntax for the LOAD command on Informix when used with a Windows file. In particular, I need the full pathname of the data file when used with the LOAD command.

    I have

    LOAD FROM 'C:\My directory\My data\mytable.unl' INSERT INTO mytable;

    but I get a syntax error

    [Error Code: -201, SQL State: 42000] A syntax error has occurred.

    ---- Environment ----
    O/S: WindowsXP 32-bit
    DB : Informix (IDS) 11.70.TC3DE
    JDBC: 3.50.JC9


  2. #2
    Join Date
    Oct 2011

    loading into informix

    try it without quotes around the path?

    double quotes instead of single quotes around path?

    if you can, change file location to somewhere without spaces in path directory - like c:\temp and try again

    also, i think the data HAS to be delimited with the pipe char - "|"

  3. #3
    Join Date
    Dec 2003
    North America
    Piping symbol "|" is the default delimiter but I always state that explicitely in the UNLOAD and LOAD statements just to be sure.

    I work in an AIX environment and I don't think quotes, single or otherwise, are required for the LOAD / UNLOAD file name or path but (again) I've always used double quotes out of habit just to be sure.

  4. #4
    Join Date
    Feb 2011
    LOAD is not a SQL command but is implemented in the client by "dbaccess" and Server Studio, so will not work via JDBC. On Unix/Linux, you can create a stored procedure containing:

    SYSTEM 'echo LOAD FROM "filename" INSERT INTO tablename | dbaccess databasename';

    You could do something similar with a DOS command or batch file on Windows.

    Doug Lawry

Tags for this Thread

Posting Permissions

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