I have a SQL Server table containing a long text (varchar(max)
) column and several key columns. I need to load this data into another table, but break the long text into chunks (varchar(4000)
), so each row in the source table may become multiple rows in the target table.
Is there a way using T-SQL which can do this in one select statement and also provide a row_number
? Sort of like partition over chunk size, if this makes sense.