Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL HELP

Status
Not open for further replies.
Apr 21, 2008
3
US
This data is in SQL 2000 and the Field Name is raw_payload I want to write a query that seperates this field by the '+' as a delimiter into 4 other fields a1 a2 a3 a4 or whatever in the same database. Any help would be awsome.



raw_payload
S9000+
UV+100.0000+0.0000
UV+101.0000+101.0000
UV+102.0000+64.0000
UV+103.0000+0.0000
UV+104.0000+
UV+105.0000+0.0000
UV+106.0000+3.0000
UV+107.0000+0.0000
UV+108.0000+0.0000
UV+109.0000+0.0000
UV+110.0000+0.0000
UV+111.0000+0.0000
UV+112.0000+1494.0000
UV+113.0000+38.6623
UV+114.0000+66.0000
UV+115.0000+8.1340
UV+116.0000+0.0000
UV+117.0000+0.0000
UV+118.0000+0.0000
UV+119.0000+0.0000
UV+120.0000+0.0000
UV+121.0000+0.0000
UV+122.0000+0.0000
 
Take a look at the SUBSTRING and CHARINDEX functions. They will be what you are looking for.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top