Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Show multiple rows as one string without temp tbl's

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-01-21 : 08:47:29
Dharmesh writes "Hi,

I have one query that fetches users and their details based on certain criteria. As I loop through this (in CF), I have another query that fetches all products ordered by each user (using the userid from the outer loop).

Can I integrate this into one query, so that all the products are in a comma delimited list in one column in the first query? Would this be quicker and more efficient ?

This is a very busy site I am working on and I can't have anything on that's going to hamper performance (eg. temp tbls etc). Our database is effectively indexed already, the db is performing well, I am simply looking for an efficient, lean way of doing this to reduce code?

TIA"

X002548
Not Just a Number

15586 Posts

Posted - 2005-01-21 : 11:34:46
Why would temp tables impact performance?

Anyway...take a look

http://weblogs.sqlteam.com/brettk/archive/2005/01/05/3946.aspx



Brett

8-)
Go to Top of Page
   

- Advertisement -