Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 338
  • Last Modified:

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
0
Allen Pitts
Asked:
Allen Pitts
1 Solution
 
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now