I have a base in Microsoft SQL Server. I got the file with the stored procedure. How can I add it to my database? I tried to execute the contents of the file, but I get an error. Below are examples of errors and part of the text of the procedure.
Invalid object name 'dbo.unefficient_block'.
USE [rum] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[unefficient_block] AS BEGIN DECLARE @calls int DECLARE @msisdn nvarchar(20) DECLARE @status int DECLARE @warn_sms int declare @lang int declare cur1 CURSOR FOR select nds, count(*) as calls from rum.dbo.unefficient_calls where nds not in (select phone from rum.dbo.huly h) -- and nds not in (select msisdn COLLATE SQL_Latin1_General_CP1_CI_AS from rum.dbo.unefficient_status s where status=1) group by nds