Say I have a .sql script stored in c:\scripts\some_script.sql.
What command do I use to execute this script from within another script or stored procedure.
For example
create procedure dbo.sp_execute_script
@script_location varchar(100)
as
execute(@script_location)
-- does not work
go
I am running the scripts in SSMS.
c:\scripts\some_script.sql, and that in turn should call another script - is that the case? Where is thecreate procedurecode supposed to be?