ahmed elbarbary

ahmed elbarbary

  • 942
  • 1.6k
  • 128.3k

How to get feature key and feature value separated $ based on part id

Oct 28 2021 1:14 AM

I work on sql server 2012 i need to get featurekey and feature value separated $
Based on partid but i don't know how o do that by select sql query ?
expected result as below

PartId Featurekey FeatureValue
1550 Botato$Mango$dates Yellow$Red$Black
1600 Rice$macrona$chicken white$Red$Yellow
1700 Guava$grapes$FIG Yellow$Green$Red
create table #PartsFeature
 PartId int,
 Featurekey nvarchar(200),
 FeatureValue nvarchar(200),
 insert into #PartsFeature(PartId,Featurekey,FeatureValue)


Answers (6)