Re: Break out Pipe Values



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



.



Relevant Pages

  • Re: Break out Pipe Values
    ... Arnie Rowland, Ph.D. ... Most good judgment comes from experience. ... 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 ...
    (microsoft.public.sqlserver.mseq)
  • To Veterans who were denied employment because of your DD-214 codes
    ... To Veterans who were denied employment because of your DD-214 codes ... SPN/SPD or RE codes you need to immediately contact a civil rights ... These codes DO NOT apply to any Dept of Defense related civilian, ...
    (soc.veterans)
  • To Veterans who were denied employment because of the DD-214 codes
    ... To Veterans who were denied employment because of the DD-214 codes ... SPN/SPD or RE codes you need to immediately contact a civil rights ... These codes DO NOT apply to any Dept of Defense related civilian, ...
    (soc.veterans)
  • To Veterans who were denied employment because of the DD-214 codes
    ... To Veterans who were denied employment because of the DD-214 codes ... SPN/SPD or RE codes you need to immediately contact a civil rights ... These codes DO NOT apply to any Dept of Defense related civilian, ...
    (sci.military.naval)
  • To Veterans who were denied employment because of the DD-214 codes
    ... To Veterans who were denied employment because of the DD-214 codes ... SPN/SPD or RE codes you need to immediately contact a civil rights ... These codes DO NOT apply to any Dept of Defense related civilian, ...
    (soc.veterans)