insert multichar delimited file with BTEQ

Database

insert multichar delimited file with BTEQ

I am trying to load a file with delimiter which is multi character. I was successfully able to load a file with single character as the delimiter, but couldnt load using mutliple character delimiter.

Also I need to specify the characterset as "UTF8". How do I do this?

Text file example records:

abcd~|12345
efg~|345
fghjk~|234

The file contains 2 cols. First col is varchar(25) and next column is integer, separated by delimiter "~|"

Here is the script:
.IMPORT vartext '~|' FILE=test.dat;
.repeat *

USING
col1 (VARCHAR(25)),
col2 (integer)
INSERT INTO db1.test_table
(
col1,
col2
)
VALUES
(
:col1,
:col2,
);
1 REPLY

Re: insert multichar delimited file with BTEQ

It is not possible in BTEQ. Only Single character will be used as Delimiter....

P>S : It is old post but still gave answer for others reference :)