Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> End of record identifier in CTL file
I have a dilemma that I am hoping someone can aid me in solving. I
need to know how many fields were populated during the load process.
The records I am loading are in a TXT file and each field is
terminated by | and each record is terminated by carriage return.
Only enough fields are provided to indicate the position of the data.
What I mean is this. The record has 30 fields, but if the last field
that has data in it is field 5, the record ends there. e.g.
abc|def|ghi|jkl|mno<CR>
I am using TRAILING NULLCOLS in the CTL file, so it won't report an error, but I would need to know that field 6 wasn't provided. As it is now, the following record ends up looking the same as the one above.
abc|def|ghi|jkl|mno|||<CR>
I wouldn't mind if they ended up looking the same if I could add a new field with the actual field count. I have tried
Field1 "nvl(:Field1, '#')"
to indicate with a # that the field wasn't there, but since no data and empty string is treated the same, it didn't work.
Any suggestions would be appreciated,
TK Received on Thu May 27 2004 - 14:09:27 CDT
![]() |
![]() |