var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
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.
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
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 - "|"
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.
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.
Tags for this Thread