Home » RDBMS Server » Server Utilities » SQL Loader INFILE w/ Date
SQL Loader INFILE w/ Date [message #343554] Wed, 27 August 2008 09:13 Go to next message
NYSIF Steve
Messages: 2
Registered: August 2008
Location: Albany, NY
Junior Member
I am working on a interface that requires a SQL loader to import data into a table from a delimited txt file. I am having issues trying to specify the INFILE file name because it contains the date within the file name.

The file to be imported is in the following format:
CMSYYYYMMDD.txt
ie. CMS20080827.txt

Below is a portion of my code:
LOAD DATA
INFILE '$NYSFMS_TOP/data/CMS/CMS||to_char(date "yyyymmdd")||.txt'
APPEND 
INTO TABLE NYSFMS.NYSIF_CMS_TRANSACTIONS
FIELDS TERMINATED BY '|


I have not tested this yet, it is correct or is there another way to do this?

Thanks ahead of time.
Steve
Re: SQL Loader INFILE w/ Date [message #343583 is a reply to message #343554] Wed, 27 August 2008 10:24 Go to previous message
Michel Cadot
Messages: 68651
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This will not work.
Pass the infile name from command line and not in control file then you can all what can do a shell script.

Regards
Michel
Previous Topic: sqlldr
Next Topic: Refresh a Schema - Data Only
Goto Forum:
  


Current Time: Tue May 14 15:24:11 CDT 2024