Janine, I don't think I'm following your example. What's wrong with the second example? also, why do you need 2 queries? Why not a join? a join would give you columns of name , answer name, answer, name, answer name, answer
ORder by name and make sure there is a PK ... then do this: <cfoutput query="myQuery" group="name"> #name# (or <Cfset theName = name > if you like) <cfoutput group="PK"> ... Use the PK to ensure all records are iterated.... #answer# (or <cfset Answer1 = answer>) </cfoutput> </cfoutput> Still... I'm not sure I know exactly what the problem is from the example below. -Mark ************* your example ********************* This is somewhat of a repost from the other day but haven't gotten any feedback- since I don't think I worded my problem very well. I am moving some of my work from cfquery to storedprocedures- the problem is the formatting when I use cfset with a stored procedures- they don't react the same way as a cfquery does... I need the info to show as such Mark: 1. A 2. B 3. A Mary 1. A 2. A 3. D John 1. C 2. A 3. B To achieve this with cfquery I did this: <CFOUTPUT QUERY="QOne"> <CFSET NAME= One.FIRSTNAME> <CFLOOP QUERY ="QTwo"> <CFSET One=QTwo.Answer[1]> <CFSET Two=QTwo.Answer[2]> <CFSET Three=QTwo.Answer[3]> </CFLOOP> </CFOUTPUT> If I do the same with a stored procedure I end up with Mark: 1. A 2. B 3. A Mary 1. A 2. B 3. A John 1. A 2. B 3. A I can't use just a regular output like Ben Forta shows in this CF5 book-I've tried all his solutions but they all deal with regular outputs(which works fine with the cfquery and cfstored proc)- I need to use a cfset statement because each answer needs its own name. Has anyone run across this? What's the best solution? ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists