SQL Syntax Parsing one record into multiple

triphen
triphen used Ask the Experts™
on
Hello Experts,

I am using SyBase SQL Anywhere 10 and VS 2015 C#

This is what I have
ID           Employee      SecurityLevel          Stores
100           John Smith      100                                 ,S1,S3,S12,


This is what I want the result to be
ID           Employee      SecurityLevel      Stores
100           John Smith      100                               1
100           John Smith      100                         3
100           John Smith      100                        12

Essentially I want to Parse 1 record into 3 individual based on the Stores column
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
It looks like you have access to the sa_split_list() system procedure in SQL Anywhere 10:
http://dcx.sybase.com/index.html#1001/en/dbrfen10/rf-sa-set-http-option.html

With this one, you can do something like:

Author

Commented:
Thank you. I actually found another table in the database that already has it split that I was unaware of. Thank you!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial