Thanks! One more thing - the date in the column is formatted as 20021001. How can I 
format it so it reads 10/01/2002. I was looking at the dateformat cmd, but I don't 
think that is useful. Any ideas? I'm still kind of new to this...

Robert O.

-----Original Message-----
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 3:39 PM
To: CF-Talk
Subject: RE: select more columns


oops sorry u also need to take off URL so it should be like

<cfquery name="getsomedata" datasource="log_stats">
select count(url) as VISITS, IP_Column, Date_Column
from log_data
group by url
order by visits desc
</cfquery>

-----Original Message-----
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 2:26 PM
To: CF-Talk
Subject: RE: select more columns



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

Reply via email to