A request cameto me asking how to create a stored procedure call with no arguments.
Here is the steps for the following example:
Run the following script against the database:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
if exists (select * from dbo.sysobjects where id = object_id(N’[dbo].[example]’) and OBJECTPROPERTY(id, N’IsProcedure’) = 1)
drop procedure [dbo].[example]
GO
CREATE PROCEDURE dbo.example
AS
BEGIN
SELECT’Hello’ [Result]
FOR XML RAW,xmldata
END
GO
SET QUOTED_IDENTIFIER OFF
GO
SET […]