-
Hello,
I am receiving flat delimitered files where the date is either YYYYMMDD or has just a zero (meaning no date).
Is there a control file clause to convert 0 to null for that column? Otherwise I'll either write some shell script or even C code to transform the 0 data.
Thank You!
Don't blame me, I'm from Red Sox Nation.
-
-
This is what I have learned from the documentation (for anyone else who see's this subject and simply is curious themselves about how to do it).
LOAD DATA
.
.
.
INTO TABLE t1
fields terminated by "," optionally enclosed by '"'
(
col1,
col2,
col3 "DECODE( :col3,
0,NULL,
TO_DATE(:col3,'YYYYMMDD')
)",
col4,
col5
)
Thank you again to all the paient people in this forum.
Don't blame me, I'm from Red Sox Nation.
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
|