Where statement with variables
From: Phil (Phil_at_discussions.microsoft.com)
Date: 01/31/05
- Next message: Hugo Kornelis: "Re: Where statement with variables"
- Previous message: Nigel Rivett: "RE: Describing a table structure"
- Next in thread: Hugo Kornelis: "Re: Where statement with variables"
- Reply: Hugo Kornelis: "Re: Where statement with variables"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 31 Jan 2005 01:21:02 -0800
Hi All,
Just a quick question for anyone, I have a stored procedure that uses a lot
of variables in a where statement, the only problem with this is it's very
slow, I am just listing them something like this
WHERE
AND (tblSurvey.disposal_method = @disposalRoute OR @disposalRoute = 'null')
AND (tblSurvey.air_conditioning = @airCon OR @airCon = 'null')
AND (tblSurvey.documentation = @documentation OR @documentation = 'null')
is there a better way of writting this statement to speed it up.
Thanks for your help.
Regards Phil
- Next message: Hugo Kornelis: "Re: Where statement with variables"
- Previous message: Nigel Rivett: "RE: Describing a table structure"
- Next in thread: Hugo Kornelis: "Re: Where statement with variables"
- Reply: Hugo Kornelis: "Re: Where statement with variables"
- Messages sorted by: [ date ] [ thread ]