Solved

SQL Syntax Parsing one record into multiple

Posted on 2016-07-15
2
28 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 6

Accepted Solution

by:
bcnagel earned 500 total points
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now