Re: Break out Pipe Values
- From: "Arnie Rowland" <arnie@xxxxxxxx>
- Date: Tue, 26 Sep 2006 12:17:09 -0700
I'm sure, that if you will look though that material again, you will see
that it is a easy task to include additional columns from the table -even as
you are deconstruction a single field.
Having the deconstructed data, without any way to relate it to the remainder
of the data would be worthless -n'est-ce pas?
--
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:1A886F4B-9AEC-44F0-A7D2-C7126DC9965C@xxxxxxxxxxxxxxxx
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
.
- References:
- Re: Break out Pipe Values
- From: Arnie Rowland
- Re: Break out Pipe Values
- From: Phil
- Re: Break out Pipe Values
- Prev by Date: Re: Break out Pipe Values
- Next by Date: sql query single table
- Previous by thread: Re: Break out Pipe Values
- Next by thread: sql query single table
- Index(es):
Relevant Pages
|
|