Subject | Re: [ib-support] Problem with dates in SP |
---|---|
Author | Marco Lauria |
Post date | 2002-08-19T16:23:38Z |
At 18.19 19/08/2002 +0200, you wrote:
Thanks
Marco
Best Regards,
Marco Lauria
STARMAX s.a.s.
TEL. +39-091-6880476
FAX. +39-091-6887202
MOB. +39-348-3547034
[Non-text portions of this message have been removed]
>Reading your original post doesn't give me more clues then this.OK, so I have to pass the duration as a Parameter...
>
>Please explain more... Questions below. And you should have
>started with this right away - then you probably would have had
>an answer by now.
>
>-- what kind of value are you passing to P_DELTA (TIMESTAMP?)
>
> P_DELTA TIMESTAMP)
>RETURNS (
> ID_INTERVENTI NUMERIC (18, 0))
>AS
>declare variable DELTA_TIME TIMESTAMP;
>BEGIN
> DELTA_TIME = CAST ('now' AS TIMESTAMP);
>
>-- The aim of this is, what?
>
> DELTA_TIME = DELTA_TIME - :P_DELTA;
>
>-- time minus time doesn't get you a "time value" - it get's a duration.
>Therefore, WHAT are you passing, and WHY?
>
> FOR SELECT ID_INTERVENTI FROM INTERVENTI
> WHERE ORA_INVIO < :DELTA_TIME AND ((INVIATO IS NULL) or (INVIATO=0))
>
>-- is ORA_INVIO a TIMESTAMP column or a duration (integer?)
>If it's a timestamp, what's wrong with passing a certain amount of time,
>for example, 10 days to P_DELTA and doing the query like:
>
>WHERE ORA_INVIO < (CURRENT_TIMESTAMP - :P_DELTA)
>
>??
Thanks
Marco
Best Regards,
Marco Lauria
STARMAX s.a.s.
TEL. +39-091-6880476
FAX. +39-091-6887202
MOB. +39-348-3547034
[Non-text portions of this message have been removed]