Click here to monitor SSC

Need Help in Modifying the View Query

Last post 04-18-2009, 1:46 PM by Phil Factor. 1 replies.
Sort Posts: Previous Next
  •  04-17-2009, 2:37 PM Post number 73192

    Need Help in Modifying the View Query

    Hi,

     Apologies me for asking this help, But i am running out of time and not able to figure the solution for this and just started with the SQL.

    Have created the following query as an View .

    SELECT     TOP (100) PERCENT dbo.Tool_Group_Table.Group_Name, dbo.Tool_Group_Table.Tool_ID, 'SPC' + dbo.Tool_Group_Table.Tool_ID AS SPC_TOOL_ID,
                          CASE WHEN [Group_Name] < 'A' THEN 'SPC' + [Group_Name] ELSE [Group_Name] END AS Tool_Group, CASE WHEN [Description] IS NULL
                          THEN 'SPC' + dbo.Tool_Group_Table.Tool_ID ELSE [Description] END AS ToolOnly_Description

    But in this need a modification  to be done when the descrition is null, "CASE WHEN [Description] IS NULL THEN 'SPC' + dbo.Tool_Group_Table.Tool_ID ELSE [Description] END AS"

    Here i need to search for dbo.Tool_Group_Table.Group_Name and concatenate all the vaules of dbo.Tool_Group_Table.Tool_ID retruned for the group_name. This resut need to be enter in the Descrition coulmn.

    Please help in editing on this

  •  04-18-2009, 1:46 PM Post number 73200 in reply to post number 73192

    Re: Need Help in Modifying the View Query

    You would need to create a function to return a string that represented the concatenated values of of dbo.Tool_Group_Table.Tool_ID returned for the group_name, and use that in the case statement
View as RSS news feed in XML