[thelist] SQL Chaos!!

darren darren at web-bitch.co.uk
Wed Jan 29 06:52:01 CST 2003


On Wednesday, January 29, 2003 at 12:34, Martyn Haigh wrote:


MH> Using your code - I added a GROUP BY as I need it grouped by the date.
MH> Unfortunately it doesn't like the GroupDate in the Group By clause.

MH> SELECT
MH> Sum(i.OtherEnq),
MH> Sum(i.CatReq),
MH> Sum(i.KnowMore),
MH> CONVERT(varchar(10), g.DateCreated, 105) AS GroupDate
MH> FROM InterestedForm as i
MH> INNER JOIN GeneralForm as g ON i.ID = g.ID
MH> GROUP BY GroupDate

MH> Do you have any ideas?

looks like rudy's beaten me too it but, just group by the actual column
g.DateCreated instead of the alias.

MH> (also like your domain name - I'm thinking about getting business cards with
MH> web bitch printed on them!)

thanks...an old client's to blame for it all!! ;>

darren




More information about the thelist mailing list