Hi Bob, That's not working because <cfset eName = "" /> is just setting a empty variable named eName it's not updating the query variable eName. Since your in a cfoutput with a query attribute CF's going to look for a query variable that matches first. IIRC the order of lookup is query, arguments, local, cgi, url, form, cookie, client.
I think this accomplishes what you are trying to do. <table > <tr> <th> Name </th> <th> Asset </th> <th> Category </th> </tr> <tr > <cfset variables.lastEmp = "" /> <CFoutput query="qEmpAssets" > <cfif comparenocase(variables.lastEmp, trim(eName))> <cfset variables.lastEmp = trim(eName) /> <cfelse> <cfset variables.lastEmp = "" /> </cfif> <td > #variables.lastEmp# </td> <td > #aTitle# </td> <td > #cCategory# </td> </CFoutput> </tr> </table> Since it appears you are sorting the query by the ename you could group output like so: <CFoutput query="qEmpAssets" group="ename"> #eName# <br> <cfoutput> - #aTitle# - #cCategory# </cfoutput> </CFoutput> Of course you'd have to customize the layout Nik On Wed, Mar 18, 2009 at 3:45 PM, BobSharp <bobsh...@ntlworld.com> wrote: > > rom this output, I would like to eliminate repeated names .... > > eName aTitle cCategory > Doug Briggs HP Omni 510 Notebook PC > Nick Heap IBM Netfinity Server Desktop PC > Nick Heap HP Omni 510 Notebook PC > Nick Heap Motorola T60 Mobile Phone > Audrey Ibbotson Toshiba Satelite XL Notebook PC > Karen Kear Viglen 733 Desktop PC > Karen Kear HP Omni 510 Notebook PC > Office Manager HP LaserJet XL Laser Printer > Office Manager Epson Phaser Laser Printer > Glyn Martin Toshiba Tecra 8000 Notebook PC > Glyn Martin Nokia 7650 Mobile Phone Bluetooth > > I am trying to use a variable LastEmp and <CFif> <CFset> but the > output is just the same as the original. > > My script is ... > > <table > > <tr> > <th> Name </th> <th> Asset </th> <th> Category </th> > </tr> > <tr > > <CFoutput query="qEmpAssets" > > <CFif VARIABLES.LastEmp IS eName > > <CFset eName = ' ' > > <CFelse> > <CFset VARIABLES.LastEmp = eName > > </CFif> > <td > #eName# </td> > <td > #aTitle# </td> > <td > #cCategory# </td> > </CFoutput> > </tr> > </table> > > > > Am in anyway close to achieving it ? > > > > -- > I am using the free version of SPAMfighter. > We are a community of 6 million users fighting spam. > SPAMfighter has removed 12747 of my spam emails to date. > Get the free SPAMfighter here: http://www.spamfighter.com/len > > The Professional version does not have this message > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320681 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4