timscronin
MIS
I want to create a stored proc that might or might not recieve a value like below.
create proc cmine @vdate datetime = null
as
select * from table where mydate > @vdate
However if the value is null,( no value was supplied) I would not want to use the where clause. Should (or can you) use an if statement to check and see if no value was given to change the where clause?
Thanks
create proc cmine @vdate datetime = null
as
select * from table where mydate > @vdate
However if the value is null,( no value was supplied) I would not want to use the where clause. Should (or can you) use an if statement to check and see if no value was given to change the where clause?
Thanks