-
Hi All,
I posted this query long back, but didn't get the solution . Now i've to do this , because it has to run every saturday on production which generates huge weekly reports. Our QA team escalated the problem to highier levels. Please help me.
I was doing manually till now every week.
I got a package which executes a public procedure by taking sysdate as a parameter. I tried it but couldn't succeed.
Till now, i was doing like...
SQL>conn scott/tiger@orcl
SQL> Exec weekly_reports.psr_weekly_cr('27/06/2002');
This date is sysdate. I tried to pass this variable in procedure itself , but not workng, That has to be passed from OS level.
Any help would be greatly appreciated.
Thanks in advance
PNRDBA
-
why not
create or replac procedure weekly_reports.psr_weekly_cr
declare
whence date;
begin
select sysdate() into whence from dual;
rest>>of>>procedure>>using>>whence
end;
Joseph R.P. Maloney, CSP,CDP,CCP
'The answer is 42'
-
Thanks , but we have to pass this sysdate while executing this.
I tried this, but didn't work. Any solution like declaring a date variable which tracks sysdate into that at (OS level) and then while EXEC ..... can pass this variable in a shell ??
PNRDBA
-
What OS are you using?
What is your operationg system? Is it unix korn shell that you will run this?
-
try this
if unix try
mydate=`date +%d%h%Y`
conn scott/tiger@orcl
Exec weekly_reports.psr_weekly_cr('$mydate');
The mydate will give you the system date in the follwing format. 27jun02
-
Shouldn't it be:
Exec weekly_reports.psr_weekly_cr(to_date('27/06/2002','dd/mm/yyyy');
Regards
Ben de Boer
-
My OS is Linux 7.2, and i tried in both the ways you people mentioned. But it didn't work. I checked all the permissions, every thing is fine. Its not accepting the date format. Can any one help me please.
PNRDBA
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|