Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
OwnedByTheMan
Starting Member
35 Posts |
Posted - 2002-01-15 : 22:30:17
|
| create procedure test @var1 varchar(25) = NULL,@var2 varchar(25) = NULL,@var3 varchar(25) = NULLCalling this from an ASP page, I might create a statement like this:Exec test 'Variable1', '', Variable3'(I am building a web search using a dynamic "where" and I have reviewed all the dymnamic sql articles. None of them answer this question.)Now, using the above, the second var (@var2), doesn't resolve to NULL. How do I submit no value to a SP and have it assume its default value?Exec test 'Variable1',,'Variable2' gives me an error in QA.I assume that I am just missing something obvious. |
|
|
byrmol
Shed Building SQL Farmer
1591 Posts |
Posted - 2002-01-15 : 22:41:07
|
OwnedByTheMan,Name the parameterseg.exec test @var1='Variable1', @var3='Variable3' DavidMTomorrow is the same day as Today was the day before. |
 |
|
|
OwnedByTheMan
Starting Member
35 Posts |
Posted - 2002-01-16 : 11:17:29
|
| Of course... I knew it must be stupidly simply. Thanks for the pointer. |
 |
|
|
|
|
|