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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

horizontal ref to vertical table

Status
Not open for further replies.

simian336

Programmer
Sep 16, 2009
723
US
I have a third party app that stores related records in field like...

id xref
33067 C33071 C33113 C33180
33127 30687 33128
34331 R34332 R34333

I need them in three columns like...

id xref type
33067 33071 C
33067 33113 C
33067 33180 C
33127 30687
33127 33128
34331 34332 R
34331 34333 R

I have a working solution in a cursor... But I need this for a report.

Any thoughts!

Thanks

Simi
 
First split xref to rows based on space using any of the splitting functions available and then analyze the first character and move to last column if it's not numeric.

PluralSight Learning Library
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top