Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
lbodie
Starting Member
4 Posts |
Posted - 2003-05-08 : 10:32:31
|
| Can someone help me split an array out into new fields? Here is what I have:table.field is a char[96] that contains 4 elements separated by ; eg, 28.22;1.31;1.10;.20I need to run some sort of update putting each of these values into their own field which has already been defined as a decimal field.Thansk,Larry |
|
|
macka
Posting Yak Master
162 Posts |
Posted - 2003-05-08 : 10:36:12
|
| Take a look at [url]http://www.sqlteam.com/item.asp?ItemID=637[/url]macka.--There are only 10 types of people in the world - Those who understand binary, and those who don't. |
 |
|
|
lbodie
Starting Member
4 Posts |
Posted - 2003-05-08 : 12:58:17
|
| I need something like this...UPDATE Order_Line_Invoice_InfoSET tax1 = CONVERT(decimal(18, 5), SUBSTRING(taxamount, 1, CHARINDEX(';', taxamount) - 1)), tax2 = CONVERT(decimal(18, 5), SUBSTRING(taxamount, CHARINDEX(';', taxamount) + 1, CHARINDEX(';', taxamount, CHARINDEX(';', taxamount) + 1) - CHARINDEX(';', taxamount) - 1))I don't know the syntax for tax3 and tax4. |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
|
|
|
|
|
|
|