I have a column that gives info on how to parse another column within the same table.The column has the property name and string length of the value that it appears in the next column. Here is how it looks:
PropertyNames PropertyValuesString
SP_PartnerCode:S:0:14:FirstName:S:14:5:LastName:S:19:9: InvestProBase2rogerpatterson
SP_PartnerCode:S:0:14:FirstName:S:14:5:LastName:S:19:7: InvestProBase2AaronSchmidt
SP_PartnerCode:S:0:0:FirstName:S:0:6:LastName:S:6:9: JosephGaultieri
SP_PartnerCode:S:0:14:FirstName:S:14:4:LastName:S:18:9: InvestProBase2ToddEdmondson
SP_PartnerCode:S:0:14:FirstName:S:14:7:LastName:S:21:4: InvestProBase2MichaelLove
I want to separate this into a column per property name, like this:
SP_PartnerCode FirstName LastName
InvestProBase2 roger patterson
InvestProBase2 Aaron Schmidt
Joseph Gaultieri
InvestProBase1 Kevin Lemmon
InvestProBase1 John Switzer
InvestProBase2 bryan abbott
InvestProBase2 Todd Edmondson
InvestProBase2 Michael Love
Is this possible?
You should really normalize your data, was the first thing that came to my mind.
This function parses your data for a given property:
and then SELECT your data