I have a flat file with the following format, In the beginning 1 Header Record, In the End 1 Trailer Record and in the middle Detail Records.
For example See Below
Now the problem is how I can load into the table? I know I have to use SQL loader and I can load one flat file without Header & Trailer But what if I have every thing in one file? What techniques I will use perform this task.
Thanks in advance
This link may give you the answer, it should be possbile to load data conditionally depending on content of the row:
Thanks Ora 777,
The website you provide it is really helpful, but if you see my original post, what I need to load Header, Detail and Trailer data. Now the confusion is do I have to create 3 tables one for header, one for Detail and one for Trailer
Do I have to create only 1 table but if one table than the content of Header,Detail and Trailer are totally different with each other? This is point where I am confused. Sounds like should I create 3 table and using the conditional SQL*Loader I will load Header data from flat file into Header table, Detail data into Detail table and trailer data into Trailer table, But if this is the case how I can check/condition for Header, Detail and Trailer.
Example of flat file:
First line is Header start with H, Detail lines start with D and Trailer data start with T. (Each line start with tag H, D and T)
Once again I need help to resolve the issue. Thanks in advance.
Click Here to Expand Forum to Full Width