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 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 a sup

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: #name# --#item# Will give you: Bob --book --ball Jane --book Mary --dress Jane --shoe Bob --bat Also the GROUP BY clasue in SQ

RE: Group - but with no order specified

2006-04-11 Thread Andy Matthews
If he's typing it in in "order" then why not just order it by the autointeger field? -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 11, 2006 2:53 PM To: CF-Talk Subject: Re: Group - but with no order specified > I'm not

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 necess

RE: Group - but with no order specified

2006-04-11 Thread Andy Matthews
If you've got access to mySQL then just ORDER BY RAND(). -Original Message- From: Ken Ferguson [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 11, 2006 3:01 PM To: CF-Talk Subject: Re: Group - but with no order specified It may well be that they don't "not car

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 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 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 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, b

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 >

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 array.

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? > > > Select myGROUP, mySubGROUP from myTABLE > > > I need output like: > > 1. myGROUP >