help me out [message #74074] |
Thu, 02 September 2004 04:54 |
subhasish
Messages: 33 Registered: May 2000
|
Member |
|
|
I have a specific problem related to SQL*LOADER.. which I think should be very common... though I could able to find the solution..
HOST('d:OBINSQLLDR.EXE USERID=HRPAY/HRPAY CONTROL=D:EBIZHRPAYarsARS_test.TXT');
the above lines are from application(forms) or can be considered as command line.
ARS_test.TXT contains...........
load data
infile 'c:attendance.txt'
APPEND into table ATTN_REC_test
WHEN vc_date = '0907'
fields terminated by WHITESPACE TRAILING NULLCOLS
( VC_TYPE CHAR(1),
VC_CARD_NO CHAR(10),
VC_DATE CHAR(8),
VC_TIME CHAR(4))
So it will load data for which vc_date = '0907'(here '0907' means 09-> day 07 -> month)
It is not feasible for user to edit the vc_date each day and then fire the loading.
Is there any option as to pass the vc_date value at runtime. like example
WHEN vc_date = :date_value
:date_value will be passed from application or command line.
Thanks
Subhasish
|
|
|
|
Re: help me out [message #74080 is a reply to message #74075] |
Fri, 03 September 2004 05:37 |
subhasish
Messages: 33 Registered: May 2000
|
Member |
|
|
Thanks Mahesh .. Since I am into 2000 server ....unix script won't do ..Though I could able to solve the problem by using simple text_io package.. at the application level to modify the control file at fly used by SQL*Loader.
Though the stated problem could have easily done by using staging table( ie. total insert into temp table and use pl/sql to get the required data from staging table to required table). Since I have a huge data to be loaded everyday I prefered the former one saving time and resource.
Thanks again..
|
|
|