Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> How to compare date in WHEN clause of SQL*Loader?

How to compare date in WHEN clause of SQL*Loader?

From: Muru <muru_oracle_at_yahoo.com>
Date: Tue, 20 Mar 2001 18:44:17 -0800
Message-ID: <F001.002D2948.20010320173550@fatcity.com>

Hi,

I need to find whether SYSDATE falls between beginning date and ending date while loading data from a flat file. I searched Oracle manuals and Metalink, could not find a clue. Is this possible at all? If so how?

example:



LOAD DATA
INFILE 'price.dat'
INTO TABLE price
WHEN TRUNC(SYSDATE) BETWEEN price_beg_date AND price_end_date
(

price_code POSITION(1:3) CHAR
amount POSITION(4:7) INTEGER
price_beg_date POSITION(8:16) DATE 'MMDDRRRR' price_end_date POSITION(16:24) DATE 'MMDDRRRR' )

price.dat



AAA10000318200103182002
BBB20000318200003182001 While loading the above, only the first record should get inserted. We can use a temporary table to load all records and filter to final table using SQL, but the data is huge and so filtering while loading would be a better option.

Any help is highly appreciated.

Thanks
Muru



Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Muru
  INET: muru_oracle_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Tue Mar 20 2001 - 20:44:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US