Home » RDBMS Server » Server Utilities » Header and Footer in sqlloader
Header and Footer in sqlloader [message #71011] Mon, 26 August 2002 21:50 Go to next message
Arfat
Messages: 25
Registered: August 2002
Junior Member
Hi evry 1
In data file i am having an Header and Footer which i want skip while loading to oracle through sql loader.
The header can be elimenated using skip=1 what abt footer is there any solution for it
Re: Header and Footer in sqlloader [message #71031 is a reply to message #71011] Wed, 28 August 2002 16:38 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
You can pre-process the file to trim off what you don't want.

This trims off the first 5 and last 3 lines off zz.txt and outputs to zz_new.txt
#!/bin/ksh
export TRIM_HEAD=5
export TRIM_TAIL=3
export LINES=`wc -l zz.txt | awk '{ print $1 }'`
echo Lines in zz.txt=$LINES

nawk -F "&#124" '{if(NR > ENVIRON[["TRIM_HEAD"]] && NR < ENVIRON[["LINES"]]-ENVIRON[["TRIM_TAIL"]]) print $0 }' zz.txt > zz_new.txt
Re: Header and Footer in sqlloader [message #71048 is a reply to message #71011] Sun, 01 September 2002 20:09 Go to previous message
Arfat
Messages: 25
Registered: August 2002
Junior Member
Hi andrew,
The processing of file statment u sended is for unix,
can i get something same which i can use it from DOS prompt to process the file as the oracle is on windows.
I will be really thankfull for that.
Previous Topic: Is it Possible to Read .DMP FIle without Importing??????????
Next Topic: Import txt file to Oracle SQL* Plus
Goto Forum:
  


Current Time: Sun May 05 17:06:36 CDT 2024