Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

TSQL Challenge 78 - Parse single field into multiple fields

By Jacob Sebastian,

TSQL Challenge 78 - Parse single field into multiple fields

The challenge idea is taken from a problem discussed in the MSDN TSQL forum. The database field contains long string with data for Quantity and Parts. The challenge is to parse the data into separate (Quantity and Parts) fields for displaying in a report. The Quantity of Parts is placed before the hyphen (-) and the Part number after the hyphen. If there is more than one part, each part is separated by a semi-colon.

http://beyondrelational.com/puzzles/challenges/112/parse-single-field-into-multiple-fields.aspx

Total article views: 2468 | Views in the last 30 days: 4
 
Related Articles
ARTICLE

TSQL Challenge 74 - Find the expiring quantity of material

The challenge is to create a query for a report that show expiring material

FORUM

T-SQL Challenge, One row to Many based on Quantity

Cursors are bad! Can this be set based?

FORUM

A strange T-SQL challenge

A strange T-SQL challenge - At least to me

FORUM

TSQL Challenge 74 - Find the expiring quantity of material

Comments posted to this topic are about the item [B]TSQL Challenge 74 - Find the expiring quantity o...

FORUM

Track Updates in Quantity Field

Hi, Thanks for your time. I only have basic info about Sql Server database handling. What I nee...

Tags
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones