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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Split Function - MSSQL 2000

Author  Topic 

folumike
Starting Member

24 Posts

Posted - 2012-04-18 : 16:25:30
I was given this task to solve with MSSQL 2000. Kindly assist me on how to use split function in MSSQL 2000 to solve it. I want to remove the '/' and split the columns. See the details below. Kindly assist as soon as possible.

TABLE NAME: Item
FIELDS:
Itemid int, WH nvarchar(100), InvID nvarchar(100), BegQty nvarchar(100), WHQty nvarchar(100), TotalQty nvarchar(50)

Initial Table
Itemid WH InvID BegQty WHQty TotalQty
1 WH1/WH2/WH3 0001 10/15/5 0/20/5 20
2 WH1/WH2/WH3 0002 20/5/10 10/20/10 40

Expected Table
Itemid WH InvID BegQty WHQty TotalQty
1 WH1 0001 10 0 20
1 WH2 0001 15 20 20
1 WH3 0001 5 5 20
2 WH1 0002 20 10 40
2 WH2 0002 5 20 40
2 WH3 0002 10 10 40



robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-04-18 : 17:35:32
There are a number of solutions in these threads:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=50648
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=66911
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76033
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-04-19 : 01:00:30
why do want to store values like this in first place? have you heard about normalisation.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -