SELECT x.*
FROM TableA
CROSS APPLY (
SELECT cust, SUBSTRING(wptext, 1, 80), 1 UNION ALL
SELECT cust, SUBSTRING(wptext, 81, 80), 2 UNION ALL
SELECT cust, SUBSTRING(wptext, 161, 80), 3 UNION ALL
SELECT cust, SUBSTRING(wptext, 241, 80), 4 UNION ALL
SELECT cust, SUBSTRING(wptext, 321, 80), 5
) x (cust, wptext, seq)
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]