Re: Break out Pipe Values
- From: "Arnie Rowland" <arnie@xxxxxxxx>
- Date: Tue, 26 Sep 2006 08:09:24 -0700
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: Phil
- Re: Break out Pipe Values
- Prev by Date: Re: query for displaying non distinct entries
- Next by Date: Re: Break out Pipe Values
- Previous by thread: query for displaying non distinct entries
- Next by thread: Re: Break out Pipe Values
- Index(es):