I have a stored procedure that receives 20 different parameters as fully built Insert queries...The potential exists though that some of those parameters may be passed to the stored-procedure as empty or nulls. I need to check to make sure that it is not empty or nulls before I actually EXEC the @SQL. Can someone please let me know how to do that. A small portion of the Stored Procedure code is attached. I have arrows pointing to where I need to check the parameter. Please show me the right way of doing that. Help! msyed1.
CREATE PROCEDURE dbo.USP_InsertNewConnectionTables
Set Nocount On
Declare @SQL varchar (6000)
Select @SQL = @CONNInsertSQL
If @SQL <> String.Empty or NULLS <<<===================
IF @@ERROR <> 0