I have the following
USE [TESTDB]
CREATE FUNCTION dbo.Function1 (@input VARCHAR(250))
RETURNS VARCHAR(250)
AS
BEGIN
--do work here
END
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE FUNCTION dbo.Function2 (@input VARCHAR(250))
RETURNS VARCHAR(250)
AS BEGIN
--do work here
END
I tried to run this with my SQL connection in C#, but get the error:
CREATE FUNCTION' must be the first statement in a query batch. Must declare the scalar variable "@input ".
How can I run this in C#?