Is it possible to create a stored procedure as
CREATE PROCEDURE Dummy
@ID INT NOT NULL
AS
BEGIN
END
Why is it not possible to do somet
Oh well, it seems I cannot edit @Unsliced post because "This edit deviates from the original intent of the post. Even edits that must make drastic changes should strive to preserve the goals of the post's owner.".
So (@crokusek and everyone interested) this is my porposed solution:
You could check for its NULL-ness in the sproc and RAISERROR
to report the state back to the calling location.
CREATE proc dbo.CheckForNull
@name sysname = 'parameter',
@value sql_variant
as
begin
if @value is null
raiserror('The value for %s should not be null', 16, 1, @name) -- with log
end
GO
Then call:
exec dbo.CheckForNull @name 'whateverParamName', @value = 1
or
exec dbo.CheckForNull @value = null