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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I automatically pass the date parameters?

Re: How do I automatically pass the date parameters?

From: Frank van Bortel <f.van.bortel_at_vnl.nl>
Date: Thu, 15 Apr 1999 10:12:57 +0200
Message-ID: <37159F89.765B87F2@vnl.nl>


SAM wrote:

> I have created a report using the reports builder (on NT 4.0) which I am able
> to run from the command line successfully.

<snipped the NT scheduler bit>

> My problem is - I pass 2 parameters Date_from & Date_to to the report which
> should
> AUTOMATICALLY take the values (7 days from today) and (yesterday)
> respectively (i.e in oracle (sysdate-7) and (sysdate-1)).

Why do you pass them anyway? Any chances they're getting changed? The answer would be R30RUN REPORT=... USERID=... BATCH=yes Date_from=... Date_to=...
However, I would not use a parameter form, but a before report trigger to set two variables
and use thos two in the select statement: WHERE SELECT_DATE between :date_from and :date_to

or just alter the where-clause to
WHERE SELECT_DATE between trunc(sysdate-7) and trunc(sysdate-1) No parameters, no nothing.
--
Met vriendelijke groet,
kind regards,

Frank van Bortel
Technical consultant Oracle
V&L Informatica BV


Work                           Home
Postbus 545                    Hunzestraat 4
7500 AM Enschede               7555 WB Hengelo
(31)53.434.1500                (31)74.242.5046


Received on Thu Apr 15 1999 - 03:12:57 CDT

Original text of this message

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