If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Load in data from an external file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-12-04, 06:23
mickykt mickykt is offline
Registered User
 
Join Date: Mar 2003
Location: Singapore
Posts: 200
Load in data from an external file

Hi,

I am trying to load data from an external file to a table,but this has been very frustrating.

I ahve inormix 9.4 on win2K.
I use this syntax and keep on getting this error,where am I wrong,do I need to have anyother thing installed.


create external table test1 (id int) using ( datafiles ( C:\Documents and Settings\informix\Desktop\emp.dat),format delimited,delimiter "," rejectfile "C:\Documents and Settings\informix\Desktop\emp.log" ,express);

201: A syntax error has occurred.
Error in line 1
Near character position 8


I am new to informix and would like to load data from a external file to the database.

Thanks
Micky
Reply With Quote
  #2 (permalink)  
Old 08-12-04, 15:22
artemka artemka is offline
Registered User
 
Join Date: May 2004
Location: New York
Posts: 248
create the table
then load the data

load from "filename"
insert into "tablename"

if there are a lot of records in the file then take a look at the dbload
command. With dbload you can commit after so manu rows, so you do not get the long transaction.

Cheers
Reply With Quote
  #3 (permalink)  
Old 08-12-04, 23:33
mickykt mickykt is offline
Registered User
 
Join Date: Mar 2003
Location: Singapore
Posts: 200
hi,
thanks for this info,I could load data using the dbload,but infortunatly am having a geopoint data type which seems to have some restriction with dbload.

Is there any other ulitity i can use.

thanks
michael
Reply With Quote
  #4 (permalink)  
Old 08-13-04, 09:36
artemka artemka is offline
Registered User
 
Join Date: May 2004
Location: New York
Posts: 248
Sorry, never worked with a geopoint datatype, can you give me an example of what it looks like?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On