Tuesday 15 February 2011

splitting values to a column with case statement in sql server -


The columns need help in the divider values. This is what I have achieved so far. When the future06 '% 418%' then (Books case when future06 '% 421%' then (Video) Other Schema.dbo.table1 False endings from / pre>

book and videos are under two main products, the future06 column, as the third column future06 Instead of being , I would like to do recordid with both books and video and product name . < / P>

Does the life see output:

  record id yield The name books of the name    

You were almost:

 Select  Select RecordID, ProductName, Books = case when future06 like '% 418%' then future 6 and null end, video = case when future '061' 421% '', then future In, the 06 schema ends with the Doubtable 1.    

No comments:

Post a Comment