Results 1 to 2 of 2

Thread: Sql Query.

  1. #1
    Join Date
    Jun 2008
    Posts
    22

    Unanswered: Sql Query.

    Hi , I have a sql code as below which returns the output as follows:
    Code:
    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.

    Code:
    		
    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)

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Substitute a slash for the comma:
    http://sqlblindman.googlepages.com/c...limitedstrings
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •