?
Solved

SQL Syntax Parsing one record into multiple

Posted on 2016-07-15
2
Medium Priority
?
51 Views
Last Modified: 2016-07-15
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
0
Comment
Question by:triphen
2 Comments
 
LVL 7

Accepted Solution

by:
bcnagel earned 2000 total points
ID: 41713628
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:
0
 

Author Comment

by:triphen
ID: 41713631
Thank you. I actually found another table in the database that already has it split that I was unaware of. Thank you!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question