Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL LOADER PROBLEM

Status
Not open for further replies.

himridul

Programmer
Jun 23, 2003
62
US
Hi All,

I need to load data into a table depending upon a particular date . suppose in the flat file I have last 100 years historic data . But I want only last 50 year's data , into the table .For that I wrote the control file , but it's not working .

LOAD DATA
INFILE 't1.out'
INSERT
INTO TABLE T1
--FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
--WHEN TO_DATE:)DOB,'YYYYMMDD') > TO_DATE('19540101','YYYYMMDD')

(
NAME position(1:4) CHAR
,DOB position(5:12) DATE "YYYYMMDD"
)




Please help .................
 
Are you getting an error message?

It would be helpful if you would post it.

When you say that it isn't working, could you give us some more specifics?

By the way, in general I load everything into a holding table and then do data manipulations, such as type conversions, data validation, and deletes of unwanted records. I then load the cleaned-up mess into the target table.

FYI,
Aryeh Keefe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top