Author: matmat
Date: Sep 19, 2008 21:27
I've not been able to find out how to pass a null value to a stored proc
via a pass through query. If I'm executing the sproc in the sql server
tooling, I can use Null as the placeholder for a null value. But nothing
I've tried in the pass through is interpreted properly by sql server.
I'm writing the pass through sql dynamically.
This works:
EXEC procMyList 1, 2, 3, 't' , 0, 0, 0, 0
These fail
EXEC procMyList 1, 2, 3, , 0, 0, 0, 0
EXEC procMyList 1, 2, 3, null , 0, 0, 0, 0
This works when executed directly on sql server
EXEC procMyList 1, 2, 3, Null, 0, 0, 0, 0
I could convert the null to 0 and test for that in the sproc but at
least I'd like to know if my original approach can be made to work.
|