Solved

SQL Syntax Parsing one record into multiple

Posted on 2016-07-15
2
43 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
bcnagel earned 500 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

Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

Question has a verified solution.

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

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
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.​
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

718 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