tag:blogger.com,1999:blog-3998417675939903159.post9177902143257154802..comments2024-03-27T00:09:01.992-07:00Comments on Olly's Blogs: Populate varchar(max) or nvarchar(max) to SSIS string variableOlof Szymczakhttp://www.blogger.com/profile/00200374014211537672noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-3998417675939903159.post-73956121643062654242016-05-01T21:19:42.382-07:002016-05-01T21:19:42.382-07:00you can split a large text to smaller chunks, in t...you can split a large text to smaller chunks, in the rows and load them in foreach loop container,abdkokhttps://www.blogger.com/profile/09736714277921922800noreply@blogger.comtag:blogger.com,1999:blog-3998417675939903159.post-59655331979641772822016-05-01T21:19:08.265-07:002016-05-01T21:19:08.265-07:00Declare @maxRowLength int = 50;
with x as (
select...Declare @maxRowLength int = 50;<br />with x as (<br />select 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s. Over the years, sometimes by accident, sometimes on purpose (injected humour and the like).' data<br />),<br />tmp(data,c,rn) as (<br />select data,SUBSTRING(data, 1,@maxRowLength),@maxRowLength<br />from x<br />union all<br />select data,SUBSTRING(data,rn,@maxRowLength),rn + @maxRowLength<br />from tmp<br />where rn < len(data)<br />)<br />select c,rn from tmp<br />OPTION (MAXRECURSION 500);abdkokhttps://www.blogger.com/profile/09736714277921922800noreply@blogger.com