Question

Convert null/missing values to a SQL NULL in SQL Server action

  • 25 April 2023
  • 0 replies
  • 22 views

Badge +1

I created a sub-zap to “wrap” a SQL Server action that executes a stored procedure.  If all of the sub-zap’s arguments have a value supplied, the procedure works as expected.

However, if a given argument is null or missing, the procedure fails because the null/missing value isn’t converted to a NULL:

EXEC MyProcedure ‘A’, , ‘C’

It needs to be:

EXEC MyProcedure ‘A’, NULL, ‘C’

NULL should not be a string, either.  This is incorrect:

EXEC MyProcedure ‘A’, ‘NULL’, ‘C’

 

Any suggestions on how do correct this behavior?


0 replies

Be the first to reply!

Reply