Re: Group by??

2012-10-03 Thread Dave Watts
So I have a query that returns the following.. Client_Code MenuName Client_Name 4938 Test Test Company 9328 Test Test Company 10349 Test Test Company 9283 Test Test 2 Company What I'm

Re: Group by??

2012-10-03 Thread Phillip Vector
Hrm.. Still getting the same result. The code that is actually printing it is #currentQuery[currentField][currentQuery.currentRow]# So I probably have to figure out how to remove the current row (since #currentQuery[currentField]# doesn't work). It's probably forcing it to display just on

Re: Group by??

2012-10-03 Thread Leigh
group=Client_Code It should work as long as its contained without a nested cfoutput as Dave mentioned. Also, notice he is grouping by Client_Name instead of the code.  Be sure the query results are sorted by that column too. -Leigh

Re: Group by??

2012-10-03 Thread Phillip Vector
*facepalms* That did it. I wasn't sorting the query by Client_Name. I was doing it by Client_Code. Thanks guys. I appricate the help. :) group=Client_Code It should work as long as its contained without a nested cfoutput as Dave mentioned. Also, notice he is grouping by Client_Name

re: Group BY

2010-11-03 Thread Jason Fisher
If this is SQL Server, than the GROUP BY has to match the un-aggregated SELECT columns, so it would need to be something like: SELECT COUNT(intMemberID) AS NewMembers, DATENAME(mm, dteAdded) + '-' + DATENAME(, dteAdded) AS Month FROM TABLE GROUP BY DATENAME(mm, dteAdded) + '-' +

RE: Group BY

2010-11-03 Thread DURETTE, STEVEN J (ATTASIAIT)
Your group by has to match your select in most cases... Also, you are using reserved words in your query so that can mess stuff up. Try this instead... Select count(intMemberID) as [NewMembers], dateName(mm, [dteAdded]) + '-' + dateName(, [dteAdded]) as MTH From table Group by dateName(mm,

Re: Group BY

2010-11-03 Thread Monique Boea
That was it. I found the solution SELECT DATENAME(mm, article.Created) AS Month, DATENAME(, article.Created) AS Year, COUNT(*) AS Total FROM Articles AS article GROUP BY DATENAME(mm, article.Created), DATENAME(, article.Created) ORDER BY Month, Year DESC At the

RE: GROUP BY problem...

2009-10-02 Thread DURETTE, STEVEN J (ATTASIAIT)
Les, I think the query as is will do what you want. Instead of fixing the query use the Grouping function of cfoutput to only display the employee name once, but the other data as it is. Steve -Original Message- From: Les Mizzell [mailto:lesm...@bellsouth.net] Sent: Friday, October

Re: GROUP BY problem...

2009-10-02 Thread Agha Mehdi
Why not just cfoutput query= group=name b#name#/bbr cfoutput #area_name#, #office_name#br /cfoutput /cfoutput On Fri, Oct 2, 2009 at 9:09 AM, Les Mizzell lesm...@bellsouth.net wrote: SELECT employees.empID employees.name,

Re: GROUP BY problem...

2009-10-02 Thread Les Mizzell
Agha Mehdi wrote: Why not just cfoutput query= group=name b#name#/bbr cfoutput #area_name#, #office_name#br /cfoutput /cfoutput I could - but it's way more complicated than that... This single query (example was simplified) is responsible for a

RE: GROUP BY problem...

2009-10-02 Thread DURETTE, STEVEN J (ATTASIAIT)
information. You could make multiple columns address1, address2, etc but that is considered really bad database design and isn't normalized. Steve -Original Message- From: Les Mizzell [mailto:lesm...@bellsouth.net] Sent: Friday, October 02, 2009 12:58 PM To: cf-talk Subject: Re: GROUP

RE: GROUP BY problem...

2009-10-02 Thread Dave Phillips
Which database server are you using? Some allow you the ability to return an aggregate of values in the form of a comma delimited list. You might be able to get your result set to look like this: EMPID NAME OFFICES 1 DaveBoston (NE), Dallas (SW), Miami (SE) 2 JohnSan

RE: GROUP BY RIGHT()?

2007-07-23 Thread Ben Nadel
Not sure if you can do that, but you might want to try getting the file extension as a calculated column in the query SELECT ( RIGHT( filename, 3 ) ) AS ext Then, in the CFOutput, you could group=ext .. Ben Nadel Certified Advanced ColdFusion MX7 Developer

Re: GROUP BY RIGHT()?

2007-07-23 Thread Charlie Griefer
cfquery name=foo datasource=bar SELECT filename, right(filename, 3) AS ext, othercol FROM table ORDER BY right(filename, 3) /cfquery cfoutput query=foo group=ext that, of course, assumes you only have file extensions of 3

Re: GROUP BY RIGHT()?

2007-07-23 Thread Brian Kotek
No, but you could select a column in your query that reads just the first 3 characters of the filename, give it a column alias, order by that column alias, and then use that in your cfoutput group attribute. Something like this (check your particular RDBMS for the Right() function or similar):

RE: GROUP BY RIGHT()?

2007-07-23 Thread Robert Rawlins - Think Blue
not grouping the gifs properly? Any ideas what I'm missing? Thanks guys, Rob -Original Message- From: Brian Kotek [mailto:[EMAIL PROTECTED] Sent: 23 July 2007 16:24 To: CF-Talk Subject: Re: GROUP BY RIGHT()? No, but you could select a column in your query that reads just the first 3

RE: GROUP BY RIGHT()?

2007-07-23 Thread Adrian Lynch
An ORDER BY? Adrian -Original Message- From: Robert Rawlins - Think Blue [mailto:[EMAIL PROTECTED] Sent: 23 July 2007 16:45 To: CF-Talk Subject: RE: GROUP BY RIGHT()? Thanks guys for the suggestion, I'll agree that the calculated column is probably my best bet, you're right Charlie

Re: GROUP BY RIGHT()?

2007-07-23 Thread Charlie Griefer
[mailto:[EMAIL PROTECTED] Sent: 23 July 2007 16:24 To: CF-Talk Subject: Re: GROUP BY RIGHT()? No, but you could select a column in your query that reads just the first 3 characters of the filename, give it a column alias, order by that column alias, and then use that in your cfoutput group

RE: Group By Hours

2007-05-01 Thread Gaulin, Mark
Check out datepart. -Original Message- From: Robert Rawlins - Think Blue [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 01, 2007 7:42 AM To: CF-Talk Subject: Group By Hours Hello Guys, I have a bunch of records of log data, all with a datetime stamp on it, and I'm looking to have SQL

Re: Group By Hours

2007-05-01 Thread Pete Ruckelshaus
select logid, classid, datetime, datepart(year, datetime) + '/' + datepart(month, datetime) + '/' + datepart(day, datetime) + '/' + datepart(hour, datetime) AS groupbyvalue from table order by datetime That looks sort of weird, but I think what you'll need to do is make sure you're grouping by

RE: Group By Hours

2007-05-01 Thread Robert Rawlins - Think Blue
Subject: Re: Group By Hours select logid, classid, datetime, datepart(year, datetime) + '/' + datepart(month, datetime) + '/' + datepart(day, datetime) + '/' + datepart(hour, datetime) AS groupbyvalue from table order by datetime That looks sort of weird, but I think what you'll need to do is make

RE: Group By Hours

2007-05-01 Thread Robert Rawlins - Think Blue
Don't Worry, Onto something now with that date part stuff. I'll let you know how I get on. Rob -Original Message- From: Robert Rawlins - Think Blue [mailto:[EMAIL PROTECTED] Sent: 01 May 2007 13:48 To: CF-Talk Subject: RE: Group By Hours Thanks for the suggestion Pete, I'm sure

RE: Group By Hours

2007-05-01 Thread Robert Rawlins - Think Blue
Ok, So I now have this grouping as I want it too, using that date part function, I just need a little help with the counting. Look below for my current query and the results returned. !--- Query to Obtain Records --- cfquery name=LOCAL.qGetAllDateRangeForUnitByDay datasource= SELECT

Re: Group By Hours

2007-05-01 Thread Deanna Schneider
It's pretty much as you said, except the syntax is: SUM(CASE WHEN logclass_id = 1 THEN 1 ELSE 0 END) as sent On 5/1/07, Robert Rawlins - Think Blue wrote: Ok, COUNT(WHERE LogClass_ID = 1) AS Sent COUNT(WHERE LogClass_ID = 2) AS Failed COUNT(WHERE LogClass_ID = 3) AS Postponed

RE: Group By Hours

2007-05-01 Thread Robert Rawlins - Think Blue
Perfect Deanna, That works nicely, glad I've got you guys on hand, I would have NEVER gotten that one on my own. Thanks a million, Rob -Original Message- From: Deanna Schneider [mailto:[EMAIL PROTECTED] Sent: 01 May 2007 14:23 To: CF-Talk Subject: Re: Group By Hours It's pretty much

Re: GROUP BY error

2007-02-12 Thread Mike Little
arrgh, couldn't work it out so have created a list and appended to it on each output so i can use a listfind to prevent duplicate ID's happening. rough but works. thanks for your help. ~| Upgrade to Adobe ColdFusion MX7

Re: GROUP BY error

2007-02-11 Thread Ben Doom
When you instruct the system to only return one of a group like that, you have to tell it which of the possible selections to make. So, you need to either group by the other columns (which will return a row for every distinct entry in that column) or use an aggregate function to only return

Re: GROUP BY error

2007-02-11 Thread Mike Little
not sure i follow ben, i don't want to include the category/collection info in the GROUP BY as this will give me the exact same result as not using GROUP BY? could you give an example of using the min/max on the other columns? thanks mate. mike When you instruct the system to only return

Re: GROUP BY error

2007-02-11 Thread Ben Doom
select id, max(otherfield) as otherfield from table, othertable where table.id = othertable.id group by id order by otherfield This is just off the top of my head, but I hope it gets the idea across. --Ben Doom Mike Little wrote: not sure i follow ben, i don't want to include the

Re: Group-level security theory

2006-11-12 Thread Tom King
Just to throw in my two pennies worth: I have a CMS where there are about 20 websites which use the same editor, file upload etc. I do this the following way - I have a table with the web site specifics in, like the various upload directories, image directories etc, and then a User table.

RE: Group-level security theory

2006-11-12 Thread Dawson, Michael
Well, here's what I do. I use Active Directory groups to manage access to different areas of our intranet. There are a few instances where I create pseudo groups from our main business system, but in the near future, that's going to change to use Active Directory as well. I have an OU, in AD,

Re: Group-level security theory

2006-11-12 Thread Claude Schneegans
I'm building a content management application targeted at small-businesses. I quite agree with Barney's description. What you describe here would be role based security. However, for small business, a permission based security would probably be more appropriate. Depends how small is you small

Re: Group-level security theory

2006-11-11 Thread Barney Boisvert
The typical name for that arrangement is role based security, and it's typical counterpart is permission based security. To align the terminology, let me restate what you said. With role based security, your application has a set of defined roles that users are assigned to. These roles are then

Re: Group-level security theory

2006-11-11 Thread Matt Robertson
Barney gave a pretty good overview. When I wrote AccessMonger, I pretty much followed the same model he describes. Permissions give you absolutely granular control over literally anything you please, but as your system grows you could potentially wind up with zillions of permissions. To help

RE: GROUP BY error

2006-08-30 Thread Ben Nadel
You could either do something like selecting the content as a substring (which will work in group by) or you could skip the Group BY and run the count as sub-query SELECT ... SUBSTRING( clubroom.cb_content, 0, 1000 ) AS cb_content ... FROM ... GROUP BY

Re: GROUP BY error

2006-08-30 Thread Mike Little
sort of like this? SELECT clubroom.cb_id, clubroom.cb_dCreated, clubroom.cb_dModified, clubroom.cb_content, clubroom.cb_isArchive, ( SELECT COUNT(cbi_id) AS image_count FROM clubroom_images ) FROM clubroom LEFT OUTER JOIN clubroom_images ON clubroom.cb_id = clubroom_images.cb_id

Re: GROUP BY error

2006-08-30 Thread Mike Little
hmmm... now i cannot get at my getArticles.image_count variable ?? sort of like this? SELECT clubroom.cb_id, clubroom.cb_dCreated, clubroom.cb_dModified, clubroom.cb_content, clubroom.cb_isArchive, ( SELECT COUNT(cbi_id) AS image_count FROM clubroom_images ) FROM

RE: GROUP BY error

2006-08-30 Thread Ben Nadel
Message- From: Mike Little [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 6:39 PM To: CF-Talk Subject: Re: GROUP BY error hmmm... now i cannot get at my getArticles.image_count variable ?? sort of like this? SELECT clubroom.cb_id, clubroom.cb_dCreated, clubroom.cb_dModified

Re: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Alan Rother
I've used it. Can you show us the SQL you are having a problem with? -- Alan Rother Macromedia Certified Advanced ColdFusion MX 7 Developer ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243360 Archives:

Re: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Alan Rother
Here is a simple example using the Northwind database in SQL Server The key to the GROUP BY clause is that is needs to be used in aggregate functions SELECT COUNT(P.ProductID) AS ItemTotal, C.CategoryName FROM Products AS P INNER JOIN Categories AS C ON P.CategoryID = C.CategoryID GROUP BY

RE: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Rick Faircloth
-Original Message- From: Alan Rother [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 13, 2006 12:31 PM To: CF-Talk Subject: Re: Group By function for MS SQL Server Express 2005? Here is a simple example using the Northwind database in SQL Server The key to the GROUP BY clause is that is needs

RE: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Rick Faircloth
: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 13, 2006 12:43 PM To: CF-Talk Subject: RE: Group By function for MS SQL Server Express 2005? Ok...I had read a message that mentioned the aggregate function requirement...but how would I write my example query to include an (unneeded

Re: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Greg Morphis
By Book_Genre Order By Book_Genre Seems strange to require an unneeded aggregate function... Rick -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 13, 2006 12:43 PM To: CF-Talk Subject: RE: Group By function for MS SQL Server Express 2005

Re: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Alan Rother
Ok, I see what's going on. You want to out put your records in a group, thats a CF issue, not a SQL issue. What you need to do is to use ORDER BY to get your records in the correct order then user the GROUP attribute of the CFOUTPUT tag GROUP BY in SQL is for compiling related data and

Re: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Alan Rother
Are you trying to get a count of all of the books by Genre? Or are you trying to get a list of all of the genres? -- Alan Rother Macromedia Certified Advanced ColdFusion MX 7 Developer ~| Message:

RE: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Rick Faircloth
But why does it require that the count be calculated if I don't need that information? -Original Message- From: Greg Morphis [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 13, 2006 1:05 PM To: CF-Talk Subject: Re: Group By function for MS SQL Server Express 2005? But it is needed

Re: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Greg Morphis
:05 PM To: CF-Talk Subject: Re: Group By function for MS SQL Server Express 2005? But it is needed, that query is returning the count of the books per book_genre On 6/13/06, Rick Faircloth [EMAIL PROTECTED] wrote: I finally did get Express to give me the results I wanted... Here's

RE: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Dave Watts
Ok...I had read a message that mentioned the aggregate function requirement...but how would I write my example query to include an (unneeded?) aggregate function? (And why would there be an aggregate requirement anyway?) Query (MySQL version): Select * from books group by genre The

RE: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Dave Watts
Just a list of the genres to fill out a dropdown list... SELECT DISTINCT Genre FROM Book Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago,

RE: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Rick Faircloth
??? Rick -Original Message- From: Alan Rother [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 13, 2006 3:55 PM To: CF-Talk Subject: Re: Group By function for MS SQL Server Express 2005? SELECT DISTINCT(Book_Genre) AS MyGenre FROM Books ORDER BY Book_Genre This will accomplish what you

RE: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Rick Faircloth
Yep...it was one of those duh moments... Thanks for your help. Rick -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 13, 2006 4:41 PM To: CF-Talk Subject: RE: Group By function for MS SQL Server Express 2005? Just a list of the genres to fill out

RE: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Dave Watts
Question: What's the benefit to using the alias? Is there a benefit or is its usage just required? Could it just be: Select distinct Book_Genre from Books order by Book_Genre You don't need an alias. SELECT DISTINCT fieldname FROM tablename will do. Dave Watts, CTO, Fig Leaf

Re: Group By function for MS SQL Server Express 2005?

2006-06-13 Thread Alan Rother
Not really, it's just a habit. I like to explicitlly control the name of the resulting variable. Dave is right, as usual, you can just leave it and it will retain it's given column name. -- Alan Rother Macromedia Certified Advanced ColdFusion MX 7 Developer

Re: Group - but with no order specified

2006-04-12 Thread Denny Valliant
Also the GROUP BY clasue in SQL is a different beast than the group attribute in cfquery It is, and I think it's more what you're looking for. You don't have to order a group by. By default, depending on your query, it would order it the way it was entered. SQL is really quite awesome, and

Re: Group - but with no order specified

2006-04-11 Thread Jerry Johnson
Only order the groups, not the subgroups? On 4/11/06, Les Mizzell [EMAIL PROTECTED] wrote: Is there a way to group output in a query and keep the groups together, but with no order specified anywhere? cfquery Select myGROUP, mySubGROUP from myTABLE !---(NO ORDER BY)--- /cfquery I need

Re: Group - but with no order specified

2006-04-11 Thread Matt Williams
This idea may seem complicated, but it should work. Put the ORDER BY in the SQL. Create an empty array. Do your cfoutput with the 'group' attribute. Use cfsavecontent to put each Group's output into a variable in the array. Then you can use some kind of randomizer to grab the output from the

RE: Group - but with no order specified

2006-04-11 Thread Munson, Jacob
I don't know what DB you're using, but have you tried using 'group by'? Something like this: select fname, lname, address, city, state, zip from contacts group by state, city, zip -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 11, 2006 1:00 PM To:

RE: Group - but with no order specified

2006-04-11 Thread Everett, Al \(NIH/NIGMS\) [C]
CF doesn't care if the records are actually in order, it just processes the outer loop when there's a change of value. If myGROUP has a numeric primary key you could do your ORDER BY on that, rather than on the name of it. Failing that, you could sort in some strange way that might look random,

Re: Group - but with no order specified

2006-04-11 Thread Les Mizzell
I'd suggest creating a SORT_ORDER (INTEGER) column for each of the myGROUP records and ask your client what order he'd like them in. This is probably what's going to have to happen. Otherwise, Yoda says, Solutions there are, but convoluted are they!.

Re: Group - but with no order specified

2006-04-11 Thread Joe Rinehart
If I add a ORDER to the query, it obviously works - but, the client doesn't WANT them in any order. He just wants the groups together. I'm not trying to sound like a wiseass, but just point out a perspective: if the client doesn't care what order they're in, what's the harm in ordering them?

Re: Group - but with no order specified

2006-04-11 Thread Ken Ferguson
It may well be that they don't not care. They may be specifically asking that they not be in any sort of discernible order. Why are you using the group in the cfoutput instead of in the query? --Ferg Joe Rinehart wrote: If I add a ORDER to the query, it obviously works - but, the client

RE: Group - but with no order specified

2006-04-11 Thread Andy Matthews
To: CF-Talk Subject: Re: Group - but with no order specified It may well be that they don't not care. They may be specifically asking that they not be in any sort of discernible order. Why are you using the group in the cfoutput instead of in the query? --Ferg Joe Rinehart wrote: If I add

Re: Group - but with no order specified

2006-04-11 Thread Les Mizzell
I'm not trying to sound like a wiseass, but just point out a perspective: if the client doesn't care what order they're in, what's the harm in ordering them? Client wants it in the order he typed it in, not an alpha sort or anything. What the client don't get though is that he's not

RE: Group - but with no order specified

2006-04-11 Thread Andy Matthews
: Tuesday, April 11, 2006 2:53 PM To: CF-Talk Subject: Re: Group - but with no order specified I'm not trying to sound like a wiseass, but just point out a perspective: if the client doesn't care what order they're in, what's the harm in ordering them? Client wants it in the order he typed

Re: Group - but with no order specified

2006-04-11 Thread Scott Stroz
Correct, but if a filed being 'GROUPED' in CF is not ORDERed in SQL, then disinct items in the 'outer loop' may beoutput more than once. For example: cfset test = QueryNew('name,item') / cfset queryAddRow(test,6) / cfset querySetCell(test,'name','Bob',1) / cfset

RE: Group Query help.

2005-12-15 Thread ColdFusion
I have never tried to add MAXROWS to an CFOUTPUT Statement of a Group before, so I am not use it Can be done, however the only other way I can Think of is by creating your own counter and increment It by 1 each time until you get the desired number Of records. CFSET grpCounter = 0 CFOUTPUT

RE: Group Query help.

2005-12-15 Thread Andy Matthews
I'm no SQL expert but I don't know if what you're describing is possible. Retrieve a max of 5 rows for each group in the database. I think that's going to have to be done in CF. !//-- andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737

RE: Group Query help.

2005-12-15 Thread Bobby Hartsfield
9:21 AM To: CF-Talk Subject: RE: Group Query help. I'm no SQL expert but I don't know if what you're describing is possible. Retrieve a max of 5 rows for each group in the database. I think that's going to have to be done in CF. !//-- andy matthews web developer ICGLink, Inc

Re: Group Query help.

2005-12-15 Thread Nomad
Hi Bobby, I am using SQl Server 2000. Ben Sorry for the delay in my reply. - Original Message - From: Bobby Hartsfield [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Friday, December 16, 2005 3:34 AM Subject: RE: Group Query help. The only thing I can think of off

RE: group by date, missing something

2005-06-24 Thread mayo
Jochem, Thx. I've reread your posts a few times. It will help next time. -- gil -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Thursday, June 23, 2005 6:41 PM To: CF-Talk Subject: Re: group by date, missing something mayo wrote: SELECT MONTH(saleDate

Re: group by date, missing something

2005-06-23 Thread Jochem van Dieten
mayo wrote: SELECT MONTH(saleDate) AS theMonth, sum(saleTotal) as dailyTotal FROM sales GROUP by theMonth I know you already know how to solve your problem, but please bear with me :) The reason that your query isn't supposed to work (it will work in some implementations) is that DBMS's

Re: group by date, missing something

2005-06-22 Thread Barney Boisvert
Did you try putting MONTH(saleDate) directly in the GROUP BY clause? cheers, barneyb On 6/22/05, mayo [EMAIL PROTECTED] wrote: I'm trying to do a group by date on an access db. I have a list of sales and want to group by month and year. I can't get even a test run to work SQL below:

Re: group by date, missing something

2005-06-22 Thread eric.creese
SELECT sum(saleTotal), saledate FROM sales GROUP BY saledate - Original Message - From: mayo [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Wednesday, June 22, 2005 6:29 PM Subject: group by date, missing something I'm trying to do a group by date on an access db. I

RE: group by date, missing something

2005-06-22 Thread Dawson, Michael
. That is the only way you can really group the results correctly. M!ke From: eric.creese [mailto:[EMAIL PROTECTED] Sent: Wed 6/22/2005 6:34 PM To: CF-Talk Subject: Re: group by date, missing something SELECT sum(saleTotal), saledate FROM sales GROUP BY saledate

RE: group by date, missing something

2005-06-22 Thread mayo
, 2005 7:35 PM To: CF-Talk Subject: Re: group by date, missing something SELECT sum(saleTotal), saledate FROM sales GROUP BY saledate - Original Message - From: mayo [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Wednesday, June 22, 2005 6:29 PM Subject: group by date

RE: group by date, missing something - SOLVED, thx

2005-06-22 Thread mayo
- From: mayo [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 22, 2005 9:52 PM To: CF-Talk Subject: RE: group by date, missing something Thanks eric, but that gives a total for every day. June 21 10,000 June 20 9,555 June 19 11,200 . That's useful but I'm trying to get

RE: Group Vacation Calendar?

2005-04-15 Thread Tim Laureska
It's setup using fusebox, but can be modified pretty easily http://cfopen.org/projects/coldcalendar/ -Original Message- From: Claremont, Timothy [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 9:12 AM To: CF-Talk Subject: Group Vacation Calendar? Anybody got the workings for a

Re: GROUP and ORDER Conundrum

2005-02-03 Thread Charlie Griefer
you need to add an ORDER BY clause to your query: ORDER BY group, displayorder ('group' is a reserved word, btw...if that really is currently your column name you might want to look into changing that) On Thu, 03 Feb 2005 21:10:35 -0500, Les Mizzell [EMAIL PROTECTED] wrote: I have records in

RE: GROUP and ORDER Conundrum

2005-02-03 Thread Adrian Lynch
Show us your SQL code. What does your ORDER BY look like? Ade -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: 04 February 2005 02:11 To: CF-Talk Subject: GROUP and ORDER Conundrum I have records in a SQL Server database that I'm displaying by GROUP - but need to

RE: Group By Question

2003-11-25 Thread Dave Watts
I have a query that currently looks like: CFQUERY name=clicks_per_product_market_display datasource=# Data_Source # select * from email_results, email_blast Where email_results.emres_blast_sent_id = #URL.BLAST# AND email_results.emres_prod_catagory = '#get_cat_info.Category#' AND

RE: Group By Question

2003-11-25 Thread Ben Densmore
[EMAIL PROTECTED] I want companyA to show up only once even if they clicked 5 times. Does that make sense? Ben -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 11:43 AM To: CF-Talk Subject: RE: Group By Question I have a query that currently

RE: Group By Question

2003-11-25 Thread d.a.collie
Why are you using GROUP BY if you dont have any aggregate functions in your select clause (ie AVG() SUM() etc). Try taking it out -Original Message- From: Ben Densmore [mailto:[EMAIL PROTECTED] Sent: 25 November 2003 16:45 To: CF-Talk Subject: RE: Group By Question Dave

Re: Group By Question

2003-11-25 Thread David Fafard
use MAX(columnname) as alias along with your grouping. dave - Original Message - From: Ben Densmore To: CF-Talk Sent: Tuesday, November 25, 2003 11:44 AM Subject: RE: Group By Question Dave, That doesn't seem to do what I want it to. I modified the query to grab just the fields I'm

RE: Group By Question

2003-11-25 Thread Dave Watts
That doesn't seem to do what I want it to. I modified the query to grab just the fields I'm using and grouped by those fields: CFQUERY name=clicks_per_product_market_display datasource=# Data_Source # select email_blast.embl_email,email_blast.embl_companyname,email_blas

Re: GROUP BY year, month loop

2003-09-17 Thread Deanna Schneider
Is the problem with your query or your output? Do you get the right results when you run the query in some sort of query analyzer? If not, my first question would be about the nested year(month( function. Do you need to do it that way? Can't you just use year(column)? If it's an output issue,

RE: GROUP BY year, month loop

2003-09-17 Thread Ihrig Paul E Cont 88 ABW/EM
hey Deanna. i figured it out.. was just the morning fog... thanks.. -paul cfquery name=rsDisMonth datasource=recycle SELECT Year(Offload_Date) as yearEnterd, Month(Offload_Date) as monthEnterd, SUM(Offload_Gallons) AS SumGal FROM tblOffload GROUP BY Year(Offload_Date), Month(Offload_Date)

Re: Group and CurrentRow MOD

2003-08-18 Thread Bud
I'm trying to group people by state, with two columns of names under each state heading. This works, other than some states don't always fill the second top column in the group. Some rows display correctly, and others don't. I have some states with 3 names that work correctly. I get STATE name1

Re: Group and CurrentRow MOD

2003-08-17 Thread Scott Weikert
You can't really use currentrow with group - it throws it off. Best thing to do in those cases is create your own counter, that you refresh each time the group is looped on, and use that to do MODs on. That said, to do two columns the way you want, the manual counter bit won't work either. I'd

Re: group by in cfoutput

2002-10-15 Thread Sam Farmer
look at the group attribute of cfoutput. Should do what you want. HTH, Sam - Original Message - From: Dowdell, Jason G [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, October 15, 2002 2:30 PM Subject: group by in cfoutput Hi all, Here's a bit of a challenge. I

RE: group by in cfoutput

2002-10-15 Thread Dowdell, Jason G
It does a portion of what I want. I need to restrict the output of the group by to a max of 3 records per parent category. ~jason -Original Message- From: Sam Farmer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 3:11 PM To: CF-Talk Subject: Re: group by in cfoutput look

RE: group by in cfoutput

2002-10-15 Thread Everett, Al
Can you put maxrows=3 in the innermost CFOUTPUT? -Original Message- From: Dowdell, Jason G [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 3:15 PM To: CF-Talk Subject: RE: group by in cfoutput It does a portion of what I want. I need to restrict the output

RE: group by in cfoutput

2002-10-15 Thread Dowdell, Jason G
PROTECTED]] Sent: Tuesday, October 15, 2002 3:15 PM To: CF-Talk Subject: RE: group by in cfoutput It does a portion of what I want. I need to restrict the output of the group by to a max of 3 records per parent category. ~jason -Original Message- From: Sam Farmer [mailto:[EMAIL PROTECTED]] Sent

RE: group by in cfoutput

2002-10-15 Thread Dowdell, Jason G
That's the piece I'm working on now. It won't allow you to do that since you must specify a query in order to specify maxrows. ~Jason -Original Message- From: Everett, Al [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 3:17 PM To: CF-Talk Subject: RE: group by in cfoutput

Re: group by in cfoutput

2002-10-15 Thread S . Isaac Dealey
Hi all, Here's a bit of a challenge. I have a single table storing category information similar to any search engine. The table structure looks like this IDNameParentIDLevel 1 Computers 0 1 2 Laptop 1 2 3

RE: group by in cfoutput

2002-10-15 Thread S . Isaac Dealey
Even if you can, I suspect it's not a very efficient method. Can you put maxrows=3 in the innermost CFOUTPUT? -Original Message- From: Dowdell, Jason G [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 3:15 PM To: CF-Talk Subject: RE: group by in cfoutput It does

Re: group by in cfoutput

2002-10-15 Thread Jochem van Dieten
Dowdell, Jason G wrote: Here's a bit of a challenge. I have a single table storing category information similar to any search engine. The table structure looks like this IDNameParentIDLevel 1 Computers 0 1 2 Laptop 1

Re: group by date question

2002-08-29 Thread S . Isaac Dealey
I'm trying to group my query results by day. The field I'm grabbing from has a date/time stamp in it so what I'm getting are results grouped by time. I tried to fix this with this code which obviously doesn't work. How can I group this by date and ignore the time stamp? cfquery

RE: group by date question

2002-08-29 Thread Charles McElwee
BY convert(char(14), logdate, 111) ORDER BY logdate Chuck McElwee Macromedia Certified Advanced ColdFusion Developer www.etechsolutions.com [EMAIL PROTECTED] -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 6:08 PM To: CF-Talk Subject: Re: group

RE: Group by on date/time field

2002-07-22 Thread Gregory Harris
In the select statement of your query you can use the SQL Server DatePart function as I copy and paste from the SQL Server help file, any questions let me know: -Begin Shameless Copying-- Datepart () Returns an integer representing the specified datepart of the specified date.

RE: Group by on date/time field

2002-07-22 Thread Jeff Beer
.. Thanks! Jeff -Original Message- From: Gregory Harris [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 5:23 PM To: CF-Talk Subject: RE: Group by on date/time field In the select statement of your query you can use the SQL Server DatePart function as I copy and paste from the SQL

  1   2   >