Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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: 2533 | Views in the last 30 days: 2
 
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