[SQL] UPDATE FROM problem, multiple updates of same row don't seem to work

2004-08-09 Thread David Stanaway
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)-

[SQL] Is there a better way than this to get the start and end of a month?

2002-09-21 Thread David Stanaway
(''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 -

Re: [SQL] is there a way to get hh:mm:ss given seconds

2002-07-09 Thread David Stanaway
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

Re: [SQL] how to sort a birthday list ?

2002-06-20 Thread David Stanaway
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

Re: [SQL] URGENT: restoring a database

2001-10-25 Thread David Stanaway
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

Re: [SQL] nextval on insert by arbitrary sequence

2001-07-20 Thread David Stanaway
t; Sorry for the confusion. > > > > > > -- Dado Feigenblatt Wild Brain, Inc. > Technical Director (415) 553-8000 x??? > [EMAIL PROTECTED] San Francisco, CA. > > > > > >

Re: [SQL] example of [outer] join

2001-07-20 Thread David Stanaway
reason to upgrade to 7.1 if you are still using an earlier version of postgres) == David Stanaway Personal: [EMAIL PROTECTED] Work: [EMAIL PROTECTED]

[SQL] cumulative sum in aggregate query.

2001-07-10 Thread David Stanaway
| 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

[SQL] indexing arrays in pgaccess's query interface is failing

2001-07-03 Thread David Stanaway
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