How to use TPT for loading all the fields of a file in a single column in a table

Database

How to use TPT for loading all the fields of a file in a single column in a table

I have  multiple files to be loaded into a table using tptload. Scenario is, i have two columns in my table (one is varchar(100) and another is varchar(50000)).

In the first column, i want the name of the file to be inserted for all the rows loaded using that file.

In the second column, i want to insert the data present in all the fields of a single row of that file. So, basically i want the TextDelimiter to be new line character in tptload script.

I am not sure of what TextDelimiter to be set here.

Please find the example below:

First File data (filename abcd.txt)

a#b#c#d

e#f

j#k#l

h

Second file data (filename efgh.txt)

j#k#l#m

n#d

In table

First column Second column

abcd.txt      a#b#c#d

abcd.txt      e#f

abcd.txt      j#k#l

abcd.txt      h

efgh.txt      j#k#l#m

efgh.txt      n#d

Can anyone provide any solution for this?

2 REPLIES

Re: How to use TPT for loading all the fields of a file in a single column in a table

Urgent help required please.

WAQ
Enthusiast

Re: How to use TPT for loading all the fields of a file in a single column in a table

Probably if you skip the textDelimeter, it will pick the row as one column and insert the data into your desired column. Don't have tpt installed so can't test.