Named value pair data in VARCHAR

Moderator: NorbertKrupa

Post Reply
seanarcher7
Newbie
Newbie
Posts: 7
Joined: Thu Apr 04, 2013 8:43 pm

Named value pair data in VARCHAR

Post by seanarcher7 » Fri Jun 10, 2016 10:31 pm

Hi All,

We are trying to read LONG VAR CHAR data which has named value pair separated by '+' and the columns itself are delimited by semicolon.

For example the column has data like this:

Code: Select all

Sequence+19;Description+SB;OrderStatus+Created

If we pass attribute name as Sequence, then it should return: 19
If we pass attribute name as Description, then it should return: SB
If we pass attribute name as OrderStatus, then it should return: Created.

Please advise if there is any easy way to achieve this

scutter
Master
Master
Posts: 302
Joined: Tue Aug 07, 2012 2:15 am

Re: Named value pair data in VARCHAR

Post by scutter » Mon Jun 13, 2016 11:07 pm

Already answered in the HP Vertica Community.
Sharon Cutter
Vertica Consultant, Zazz Technologies LLC

Post Reply

Return to “Vertica SQL”