RE: sql loader
- From: "Zelli, Brian" <Brian.Zelli@xxxxxxxxxxxxxxx>
- To: 'Alisher Yuldashev' <yuldashev@xxxxxxxxxxx>
- Date: Tue, 30 Mar 2010 13:56:02 -0400
I saw several examples that very same way but say I was using a file that did: load data infile '/home/oracle/dumpdir/lims.dat' append into table hisuser.his_lims_iface fields terminated by "|" optionally enclosed by '"' ( mrn, lname, fname, midi, marital_status, bd "to_date(:bd,'MM/DD/YYYY')", sex, ssn, no_ssn_reason, hispanic, white, black, indian_alaska, asian, hawaiian, other_race, other_race_exp, death_date "to_date(:death_date, 'MM/DD/YYYY')", mail_address, city, state, zipcode, country_code, phone, doctor_number ) How would I add the sysdate column to that? Brian ________________________________ From: Alisher Yuldashev [mailto:yuldashev@xxxxxxxxxxx] Sent: Tuesday, March 30, 2010 1:50 PM To: Zelli, Brian Cc: oracle-l-freelists Subject: Re: sql loader Brian, Yes, you are right. Example: create table test(col1 number, col2 date); cat test.dat 1 2 3 4 5 cat test.ctl load data infile 'test.dat' badfile 'test.bad' discardfile 'test.dsc' into table TEST insert fields terminated by ',' (COL1, COL2 SYSDATE) Alisher Yuldashev Senior Oracle DBA www.pythian.com<http://www.pythian.com> Zelli, Brian wrote: Ok, I've gone completely brain-dead. I need to add a date column to my sqlload control file, I just use sysdate correct? If it's not part of my input file that's ok right? As long as I have a column named for it on the table I'm loading? Brian This email message may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited. If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.