take off the single quotes on VISITS. you dont need it <cfquery name="getsomedata" datasource="log_stats"> select URL count(url) as VISITS, IP_Column, Date_Column from log_data group by url order by visits desc </cfquery>
-----Original Message----- From: Robert Orlini [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 16, 2002 2:20 PM To: CF-Talk Subject: select more columns How do I select more columns from within this query? <cfquery name="getsomedata" datasource="log_stats"> select URL count(url) as 'visits' from log_data group by url order by visits desc </cfquery> I want to get the date and ip columns but get a syntax error when I add the fields after the Select statement as: select logdate, ip, URL count(url) as 'visits' Thanks. Robert O. HWW ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm

