Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatinating two fields in SQL Loader

Status
Not open for further replies.
Oct 22, 2001
215
US
Hi Gurus!
I am trying to load a Flat File where I need to combine two fields to one. Here is the file fomat:

Last_Name position (1:20)
First_Name position (100:20)

I am loding into a name field that is 50 char and I need to
add Last_Name || First_Name

So what is the way to write my control file?
TIA
 
Good Day,

The following control file concatenates the two values of x and y and loads them to the field called x in the tst table.
I'm still trying to figure out how to 'lose' the data in y - how not to load it to the table.

LOAD DATA
APPEND INTO TABLE tst
(
x POSITION(1:4) CHAR(4)
":x||:y",
y POSITION(5:8) CHAR(4)
)

Regards,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top