0

I need to scripts all the stored procedures and I am currently using the wizard to do that.

However it's scripting wrongly when a stored procedure has Quotes by creating double quotes.

How can I script a stored procedure without

EXEC dbo.sp_executesql @statement = '....'

but just as it is?

I am even ready to reinvent the wheel by using smo but seems that it does the same.

Am I missing the obvious?

Many thanks

user9969
  • 15,632
  • 39
  • 107
  • 175

2 Answers2

0

This may not be fix answer but if double quotes are the problem than char(39) can be used in place of quote in script.

-1

SQL Server Management studio scripts out as Execute SQL if you select the option

Include If Not Exists

If you uncheck that the script is generated as you are looking for.