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