I don't think it is possible (but I don't use M$SQL that often, so I may be mistaken). If it is for CF, use grouped output:
<cfquery datasource="#request.dsn#" name="qCompanySoftware"> SELECT C.COMPANY_ID, C.COMPANY_NAME, S.SOFTWARE_NAME FROM COMPANY C COMPANY_SOFTWARES COS, SOFTWARES S WHERE S.SOFTWARE_ID = CS.SOFTWARE_ID AND COS.COMPANY_ID = C.COMPANY_ID AND C.COMPANY_ID = 10 ORDER BY C.COMPANY_NAME </cfquery> <cfoutput query="qCompanySoftware" group="COMPANY_NAME"> ID: #qCompanySoftware.COMPANY_ID#<br> Name: #qCompanySoftware.COMPANY_NAME#<br> Softwares: <cfoutput> #qCompanySoftware.SOFTWARE_NAME#, </cfoutput> <br><br> </cfoutput> If you are filtering on a unique ID, you can also do: <cfoutput> ID: #qCompanySoftware.COMPANY_ID#<br> Name: #qCompanySoftware.COMPANY_NAME#<br> Softwares: #ValueList(qCompanySoftware.SOFTWARE_NAME)# </cfoutput> Pascal > -----Original Message----- > From: Nurettin Omer Hamzaoglu [mailto:[EMAIL PROTECTED] > Sent: 03 November 2004 11:29 > To: CF-Talk > Subject: MS SQL problem > > Hi all, > > I've 3 tables COMPANY, COMPANY_SOFTWARES, SOFWARES. COMPANY_SOFTWARES > table holds the data of the softwares used in the companies like; > > I need a result like; > COMPANY_ID COMAPNY_NAME SOFTWARES > ---------- ------------ --------- > 10 My Company X, Y, Z > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=36 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183243 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54