Troubleshooting
Problem
On a Windows system, executing a SQL select statement against an external table returns error code -26168.
The returned error message could be one of the following:
-26168: Conversion err:(file,offset,reason,col)=(
Cause
It is possible that the external table is using a data file that was previously unloaded from a database table using DB-Access utility or the dbexport utility.
Resolving The Problem
To avoid the error, define RECORDEND as '\012' in the CREATE EXTERNAL TABLE statement.
- RECORDEND: specifies the character that separates records in a delimited text file .
- \012: an ASCII value equivalent to the newline character.
Following is an example of how to create an external table with RECORDEND "\012":
CREATE EXTERNAL TABLE ext_tab1 SAMEAS tab1
USING (DATAFILES ('DISK:C:\temp\ext_tab1.unl'), RECORDEND '\012');
or:
CREATE EXTERNAL TABLE ext_tab1
(
col1 INTEGER,
col2 CHAR(15)
)
USING(DATAFILES("DISK:C:\temp\ext_tab1.unl"), RECORDEND "\012");
Where the "C:\temp\ext_tab1.unl" is an unload file previously produced by DB-Access or dbexport utility.
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21627845