Question

I am trying to create an external table in Informix.

create external table test_table(cols varchar(10)) 
using ( datafiles('C:/sample.txt'), format 'delimited', deluxe);

But it gives me an error :

[Error Code: -26174, SQL State: IX000]  Incorrect DATAFILE entry C:/sample.txt.

Can anyone suggest me the right syntax for path entry...

I have also tried.

load from "C:\sample.txt" insert into test_table;

Which gives me a syntax error. Any help is greatly appreciated!!

Était-ce utile?

La solution

About the create external table
Did you check the correct syntax at the manual? (here)

At datafiles keyword, you don't use the correct syntax. This probably will work.

create external table test_table(cols varchar(10)) 
using ( datafiles('DISK:C:\sample.txt'), format 'delimited', deluxe);

About the load It isn't a native command from the engine, is a specific command of dbaccess utility.
So, if you aren't using dbaccess, it will not work.
BTW, the syntax of your load is correct...

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top