Re: [SQL] Help on (sub)-select

2002-12-20 Thread Philip Warner
At 11:48 AM 20/12/2002 +, Gary Stainburn wrote: > select r.*, count(*) from roster r, roster_staff s > where rsdate = rodate and rsgid = rogid and rsgsid = rogid > group by r.* This one came up with a parser error near '*' but I don't understand it enough to debug it. Replace

Re: [SQL] Help on (sub)-select

2002-12-20 Thread Gary Stainburn
On Friday 20 Dec 2002 10:51 am, Philip Warner wrote: > At 10:21 AM 20/12/2002 +, Gary Stainburn wrote: > >nymr=# select r.*, s.tally from roster r, > >nymr-# (select count(*) as tally from roster_staff where > >nymr(# rsdate = '2002-01-01' and rsgid = 11 and rsgsid = 2) as s > >nymr-#

Re: [SQL] Help on (sub)-select

2002-12-20 Thread Philip Warner
At 10:21 AM 20/12/2002 +, Gary Stainburn wrote: nymr=# select r.*, s.tally from roster r, nymr-# (select count(*) as tally from roster_staff where nymr(# rsdate = '2002-01-01' and rsgid = 11 and rsgsid = 2) as s nymr-# where rodate = '2002-01-01' and rogid = 11 and rogsid = 2; ro

[SQL] Help on (sub)-select

2002-12-20 Thread Gary Stainburn
Hi Folks, I have two tables roster holds the duties to be performed and the number of people required per duty. roster_staff holds the people allocated to perform that duty. I'm trying to create a select that will tally the roster_staff and include it with the roster details. I've managed to