All Forums Tools
prakhar 101 posts Joined 05/08
04 Feb 2009
Problem with Multiload Accept

Hi I am trying to Run Multiload by exporting date in a file and then using it...Following is the code i am running.EXPORT REPORT DDNAME DELDATE sel end_date (title '') from tableA;.EXPORT RESET while using in MULTILOAD i am giving as .ACCEPT DELDTE FROM FILE DELDATE;DELETE FROM TABLE B WHERE CURRENT_DATE<(&DELDTE-10);but it is replacing it asDELETE FROM TABLE B WHERE CURRENT_DATE<(2009-10);And coming out with an error.but it shud beDELETE FROM TABLE B WHERE CURRENT_DATE<(2009-01-23 -10);Please clarify how to export a date format correctly and use it in MLOAD USING ACCEPT OPTION.

prakhar 101 posts Joined 05/08
04 Feb 2009

iF qUESTION IS SOMEWHAT CONFUSING PLEASE TELL..

MARAN_CHENNAI 24 posts Joined 08/08
05 Feb 2009

Hello,for that, you can need to cast the date with the appropriate date format.Regards,Maran

prakhar 101 posts Joined 05/08
05 Feb 2009

HiAll i want is to export a date in format'YYYY-MM-DD'And use it in ACCEPT commandProblem is that it is taking 2009-12-31 as three separate fileds....I hope it clarifies your query....

05 Feb 2009

EXPORT REPORT DDNAME DELDATE sel end_date (title '') from tableA;.EXPORT RESET try like thisEXPORT REPORT DDNAME DELDATE sel end_date (title '') (FORMAT 'YYYY-MM-DD') (CHAR(10)) from tableA;.EXPORT RESET

Fred 1096 posts Joined 08/04
05 Feb 2009

.ACCEPT only supports numeric values and quoted strings as input, so you have two options for your EXPORT. Convert to a numeric INTEGERDATE string, e.g.:sel TRIM(cast(end_date as INTEGER)) (title '') from tableA;Put the date string in quotes, e.g.:sel ''''||CAST(end_date as CHAR(10))||'''' (title '') from tableA;

novice 38 posts Joined 07/07
10 Feb 2009

Hi,I was thinking as why to export the date first and then subsequently read it from file as parameter Can't this be done is one step like DELETE FROM TABLE B WHERE CURRENT_DATE<(sel end_date -10 from table A); assuming mload login credentails hs select access to A and Delete privileges on B this is much simpler approach..

yoursujith 8 posts Joined 04/11
21 Dec 2011

This might be out of context but I have a small question, does .ACCEPT take 0 as well i.e if we have 010 in the file does it take 010 or only 10.....? Is there a way to make it take 010 as input using a file....?

You must sign in to leave a comment.