December 5, 2008 at 3:26 pm
I would like to say if the firmname is null, then pass empty string instead.
I thought this would do the job, but it doesn't.
AND (ISNULL (@firmname, '')='' OR firms.firmname like @firmname + '%'
after I run the query, it says the procedure expects @firmname. What do I do wrong?!
Thanks.
December 5, 2008 at 3:28 pm
If you created a stored procedure, and your header looks like this:
CREATE PROCEDURE Blah
@firmname varchar(50)
AS
and not like
CREATE PROCEDURE Blah
@firmname varchar(50) =NULL
AS
Then you need to pass in @Firmname every time.
If that's not the case, please post the rest of the query, and any line you may use to call it.
December 5, 2008 at 3:43 pm
thanks, i was missing =null part.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply