Have a try at this syntax
SELECT number
FROM procedures
WHERE date + CAST( numdays || ' days' AS interval ) = CURRENT_TIMESTAMP;
Patrick
--
-
Patrick Fiche
email : [EMAIL PROTECTED]
tél : 01 69 29 36 18
Have a try at this syntax
SELECT number
FROM procedures
WHERE date + CAST( numdays || ' days' AS interval ) = CURRENT_TIMESTAMP;
Patrick
Cool! Thanksthat works perfectly.
-Scott
---(end of broadcast)---
TIP 2: you can get
On Mon, 22 Nov 2004 15:12:26 +0100, Patrick Fiche
[EMAIL PROTECTED] wrote:
Have a try at this syntax
SELECT number
FROM procedures
WHERE date + CAST( numdays || ' days' AS interval ) = CURRENT_TIMESTAMP;
Just for the record you could write it like this too:
SELECT number
FROM procedures
Ian Barwick wrote:
On Mon, 22 Nov 2004 15:12:26 +0100, Patrick Fiche
[EMAIL PROTECTED] wrote:
Have a try at this syntax
SELECT number
FROM procedures
WHERE date + CAST( numdays || ' days' AS interval ) =
CURRENT_TIMESTAMP;
Just for the record you could write it like this too:
Just to add to the record, the mathematically sound way to write this
query would be this:
SELECT number
FROM procedures
WHERE date + numdays * interval '1 day' = current_timestamp;
Thanks for that Peter! That's a lot closer than what I originally
had...I didn't think about doing that
Scott Nixon [EMAIL PROTECTED] writes:
Am having some trouble with a query that worked in 7.0 but not in
7.3.can't seem to figure out the syntax or find info about how to do
this anywhere.
SELECT number
FROM procedures
WHERE date + numdays = CURRENT_TIMESTAMP;
In 7.0 this works with
So I think what you probably *really* want is
... WHERE CAST(date AS date) + numdays = CURRENT_DATE;
Thanks Tom! Yeah, I guess you are right on that point. I hadn't thought about
that.
The implementation of this wouldn't be affected since this query is buried in a
script
that runs