-
How do I load chr(01) delimited text using SQL Loader?
basically I have a flat file with fields terminated by chr(01) and each row is terminated by chr(02).
for now, i have to manually change the char(01) character to something meaning ful like #. i dont' want to modify my flat file at all.
here is my control file:
load data
infile '/text.txt' "str'chr(02)'"
truncate
into table test_table
fields terminated by "chr(01)"
trailing nullcols
(composer,
p_id,
t_id)
obviously this control file won't work but
it conveys what i would like to do; fields terminated by chr(01) and the newline or new row is separated by chr(02)
here is a sample of the data file:
duck, daffy char(01) 1234 char(01) 444 chr(02)bunny, bugs chr(01) 345 chr(01) 555 chr(02)pig, porky..etc
thank you
-
-
You can use X'nn' when nn is the hex value.
SNAP !
Last edited by DaPi; 04-08-2004 at 01:26 PM.
-
thanks guys. I went to
asciitable.com and lookup the
hexadecimal equivalents on chr(1) and
chr(2). this file works:
load data
infile '/text.txt' "str X'02'"
truncate
into table test_table
fields terminated by X'01'
trailing nullcols
(composer,
p_id,
t_id)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|