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)
 Sql Query.

Author  Topic 

willfindavid
Starting Member

27 Posts

Posted - 2008-09-09 : 07:46:22
Hi , I have a sql code as below which returns the output as follows:

s_sequence_desc s_resource_id no column name no column
Create Ganesan NULL Pending
Create Anand Ramachandran NULL Pending
Create Chakravarty,Amrita NULL Pending
Create Ahamed Hussain Mohammed NULL Pending
Create Account Manager NULL Pending

I want to combine all the s_resource_id column values into one single value.The values should be seperated using / .Only one record has to be displayed.

		
select s_sequence_desc,s_resource_id,null,'Pending','' from mas_project_workflow_users users,mas_project_workflow_sequence seq
where seq.i_project_id = @projId and users.i_project_id = @projId and
seq.i_sequence_id = users.i_sequence_id and seq.i_sequence_id in
(select distinct(i_sequence_id) from trn_project_workflow_current_status where i_project_id = @projId)

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-09-09 : 07:56:37
See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81254



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -