I am trying to create columns out of a single text multiline column using SQL
Data
-----
Priority | Medium
Project | Proj1
Category | Cat1
Desired Result
Three columns: Priority, Project, Category
I know how to write a case statement easily
select
Case when Desc [condition] then end 'Priority',
Case when Desc [condition] then end 'Project',
..etc
Now to extract values after | , I could write the a Java script or T-SQL that uses a substring and a charindex to locate text between | and newline.
Any help with transformer SQL? It should be easy but my luck is not hitting for now