Cannot create a row of size

Good afternoon expert,

Needed to get a copy of stored procedures to search for a string. My old DBA buddy
suggested
select o.name, c.text from sysobjects o inner join syscomments c on o.id = c.id where c.text like '%searched_for_string%';

Was going to save a copy of the table with

select o.name, c.text
into New_SP_table_090422
from sysobjects o inner join syscomments c on o.id = c.id where c.text like '%select%';

When I tried this I got
Cannot create a row of size 8075 which is greater than the allowable maximum of 8060.
The statement has been terminated.

Is there a way of getting arounf this?

Thanks.

Allen
Allen PittsBusiness analystAsked:
Who is Participating?
 
pivarCommented:
Hi,

Try

CREATE TABLE New_SP_table_090422 ([name] varchar(128), [text] text)

INSERT INTO New_SP_table_090422
select o.name, c.text
from sysobjects o inner join syscomments c on o.id = c.id where c.text like '%select%';


/peter
0
 
Allen PittsBusiness analystAuthor Commented:
Well done. Works great.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.