Re: Spool in SqlPlusa nd my doubt is How to send values to the variables in the WHERE clause.
From: A. Mehoela <a.mehoela_at_hoetmeel.com>
Date: Wed, 14 Jan 2015 22:16:20 +0100
Message-ID: <F0Btw.38287$551.11233_at_fx43.am4>
Date: Wed, 14 Jan 2015 22:16:20 +0100
Message-ID: <F0Btw.38287$551.11233_at_fx43.am4>
32442 wrote:
> TO_CHAR(s.date,'DD/MM/YYYY') >= ('&StartDate')
If you're not, and you prefer something more performant, use this:
s.date >= to_date('&StartDate','DD/MM/YYYY')
Do you think that
WHERE
TO_CHAR(s.date,'DD/MM/YYYY') >= ('&StartDate')
AND
TO_CHAR(s.date,'DD/MM/YYYY') <= ('&EndDate')
will return something sensible?? You'd better find something to do that doesn't call for logic.
WHERE
'01/01/2525' >= '01/01/2015'
AND
'01/01/2525' <= '31/01/2015'
is TRUE!! Received on Wed Jan 14 2015 - 22:16:20 CET