Home » RDBMS Server » Server Utilities » SQL Loader / Eliminate Trailing Last Record
SQL Loader / Eliminate Trailing Last Record [message #157165] Tue, 31 January 2006 12:58 Go to next message
Ganeshbabu Venkat
Messages: 17
Registered: March 2001
Junior Member
Want to know how to strip out the trailing row while using SQl loader scripts.

26182886132SMO
26182886132SMO
3200512200000009500000093


This is the file format. I need to eliminate the one that starts with the 3 the lengty string.will it be better to specify in the control file or the shell script. please explain with examples. or some code.
Re: SQL Loader / Eliminate Trailing Last Record [message #157169 is a reply to message #157165] Tue, 31 January 2006 13:15 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
In the controlfile use:
when (1) != '3'

after your INTO {table} line. This will ignore rows that have a '3' in position 1.
Re: SQL Loader / Eliminate Trailing Last Record [message #157170 is a reply to message #157165] Tue, 31 January 2006 13:24 Go to previous messageGo to next message
Ganeshbabu Venkat
Messages: 17
Registered: March 2001
Junior Member
Thanks a lot it worked.
Re: SQL Loader / Eliminate Trailing Last Record [message #157172 is a reply to message #157165] Tue, 31 January 2006 13:30 Go to previous message
Ganeshbabu Venkat
Messages: 17
Registered: March 2001
Junior Member
Are there performance issues involved with using the logical operator. Is there a way we can capture that in the unix file itself?
Previous Topic: problem in loading data from excel sheet
Next Topic: Concatenate records
Goto Forum:
  


Current Time: Tue Jul 02 04:05:32 CDT 2024