Re: Break out Pipe Values
- From: Phil <Phil@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 26 Sep 2006 11:14:02 -0700
Hi Arnie,
Thanks for the response, those links were great.
The only problem that I have is that I need the employment ID each time I
get one of the area codes and the code from the links just breaks up the area
codes but does not allow me to get any other fields of data, if you can offer
and more advice or links it would be much appreciated.
Thanks Phil
"Arnie Rowland" wrote:
You are treating a field like an array. It's not really a good idea -as you.
are finding out.
Look up the use of patindex() in Books Online. I think that you will become
very good at using patindex().
Also, these resources may help you.
Arrays and Lists in SQL Server
http://www.sommarskog.se/arrays-in-sql.html
http://www.realsqlguy.com/?p=9
http://www.aspfaq.com/2248
http://realsqlguy.com/twiki/bin/view/RealSQLGuy/ParseDelimitedStringToTable
2005-
http://omnibuzz-sql.blogspot.com/2006/06/interesting-queries-using-recursive.html
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Phil" <Phil@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9BDC616D-590D-468C-BB80-FB3FBFC1703C@xxxxxxxxxxxxxxxx
Hi.
I am trying to clean up some data and I need to seperate out some values,
I
have a table that looks something like this.
EmploymentID Areas
101 |1.2|1.3|1.4|
716 |2.3|2.4|2.5|
671 |3.4|3.5|3.6|
What I want it to look like is as follows
EmploymentID Areas
101 |1.2|
101 |1.3|
101 |1.4|
716 |2.3|
716 |2.4|
716 |2.5|
671 |3.4|
671 |3.5|
671 |3.6|
There can be more than 3 lots of numbers, I have just done this as an
example
The EmploymentID is an (int) and the Areas (varchar(255))
Thanks for any help
PD
- Follow-Ups:
- Re: Break out Pipe Values
- From: Arnie Rowland
- Re: Break out Pipe Values
- References:
- Re: Break out Pipe Values
- From: Arnie Rowland
- Re: Break out Pipe Values
- Prev by Date: Re: Break out Pipe Values
- Next by Date: Re: Break out Pipe Values
- Previous by thread: Re: Break out Pipe Values
- Next by thread: Re: Break out Pipe Values
- Index(es):
Relevant Pages
|