That'll work!!! I would have done it with a CROSS-APPLY like this, but for re-use an inline table valued function would be sweet. If anyone is interested, there is an monster discussion about about SQL vs. CLR text parsing here.
declare @count int
set @count = 5
DECLARE @temp1 TABLE (ID INT IDENTITY(1,1) PRIMARY KEY CLUSTERED, TextDescription VARCHAR(255))
INSERT INTO @temp1
SELECT 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' UNION ALL
SELECT 'Nullam a libero et dui tristique malesuada.' UNION ALL
SELECT 'Donec ultricies sollicitudin magna, eu gravida lectus fringilla ut.' UNION ALL
SELECT 'Nunc vestibulum elit tincidunt velit pellentesque feugiat.' UNION ALL
SELECT 'Aliquam eu purus a neque fringilla porta.' UNION ALL
SELECT 'Fusce pretium justo vitae mauris tempor porttitor tincidunt orci laoreet.'
;with tally (N) as
(select row_number() over(order by (select null)) from master.sys.all_columns)
select id, left(textDescription,N-1) as sub_string
from @temp1
cross apply (select Row_Number() over (order by N) as X, N
from tally
where substring(textDescription,N,1) = ' '
and N <= len(textDescription)
) ca
where ca.X = @count
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills