tablea;
id | flag
+--
1 |1
2 |1
-- Desired output is
id | flag
+--
1 |7
2 |5
Is there a way around this so that I can get the desired output?
--
David Stanaway <[EMAIL PROTECTED]>
---(end of broadcast)-
(''month'' FROM day);
year := extract(''year'' FROM day);
IF month = 12 THEN
month := 1;
year := year +1;
ELSE
month := month +1;
END IF;
RETURN (''01-''||month||''-''||year)::date -
row)
scratch=# \q
dstanawa@ciderbox:~$ bc -l
7*60+2
422
I don't know where you got 1:01:02 from.
--
David Stanaway
signature.asc
Description: This is a digitally signed message part
On Thu, 2002-06-20 at 13:55, Michael Agbaglo wrote:
> Hi !
>
> there's a nice query for retrieving the people who have their birthday
> in the next n days: (taken from Joe Celko's SQL for Smarties, 1st Ed.,
> p. 76)
>
> SELECT *
> FROM Persons
> WHERE EXTRACT( YEAR FROM AGE(dateofbirth) ) < EX
t this point I am completely stuck.
> Please help.
> thanks,
>
> Oleg
>
>
> ---(end of broadcast)---
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to [EMAIL
t; Sorry for the confusion.
>
>
>
>
>
> -- Dado Feigenblatt Wild Brain, Inc.
> Technical Director (415) 553-8000 x???
> [EMAIL PROTECTED] San Francisco, CA.
>
>
>
>
>
>
reason to upgrade to 7.1 if you are still using an earlier version of postgres)
==
David Stanaway
Personal: [EMAIL PROTECTED]
Work: [EMAIL PROTECTED]
| 1
1.9 | 1
3.4 | 5
5.2 | 3
6.7 | 2
9.3 | 0
11.3| 1
Does anyone have any suggestions as to how to do this?
--
Best Regards
David Stanaway
.-
Technology Manager - Australia's Premier Internet Broadca
dialogue:
Error: invalid command name "akID"
Is there an alternate way indexing arrays in queries that I should be
using?
Or is pgaccess just not suitable for this class of queries!
--
Best Regards
David Stanaway
.-
Tech