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 2005 Forums
 Transact-SQL (2005)
 Multiple results into 1 result

Author  Topic 

qman
Constraint Violating Yak Guru

442 Posts

Posted - 2009-08-04 : 14:20:19
How do I take multiple record results and make the result one record?
I assume I would be creating a function?

cat_jesus
Aged Yak Warrior

547 Posts

Posted - 2009-08-04 : 14:54:33
That depends on a lot of factors. How big do you expect your output to be? How many records are being combined?

You could do something like this

@declare @temp as varchar(max)
set @temp = ''
select @temp = @temp + column1 as newcolumn from table


Then make a CTE with that and select the last value. What exactly are you trying to do?









An infinite universe is the ultimate cartesian product.
Go to Top of Page
   

- Advertisement -