| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
|  |  | |||
Home -> Community -> Usenet -> c.d.o.misc -> Re: help
Chen Li wrote:
> 
> Hi, all
> 
> how to use SQL statement in SQL Loader control file?
> 
> Thanks,
> Li Chen
LOAD DATA
INFILE 'input.dat'
REPLACE
INTO TABLE mytable
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY "'" TRAILING NULLCOLS
(
  pageno,
  lineno,
  mapno,
  pmtno,
  mapgrid,
  mntid,
  owner,
  guysize,
  renthgt,
  effdate "to_date(:effdate,'mm/yy')",
  cmnt
)
In this case, the SQL function 'to_date' is being used to convert the input 'mm/yy' to a date. Note the colon (:) in front of the column name within the statement.
Yours,
Geoff Houck
systems hk
hksys_at_teleport.com
http://www.teleport.com/~hksys
Received on Wed Jun 09 1999 - 16:13:18 CDT
|  |  |