471,090 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,090 software developers and data experts.

Help with WHERE Clause in Stored Procedure


I have an sp with the following WHERE clause

@myqarep varchar(50)

SELECT tblCase.qarep FROM dbo.tblCase

WHERE dbo.tblCase.qarep = CASE @myqarep WHEN '<All>' THEN
dbo.tblCase.qarep ELSE @myqarep

@myqarep is returned from a combo box (ms access)...the user either
picks a qarep from the combo box or they leave the default which is

they problem i'm having is that if the record's value for
dbo.tblCase.qarep is null...the record does not show up in the
results...but i need it to

any help is appreciated.


Jul 23 '05 #1
2 1389
... WHERE qarep = @myqarep
OR @myqarep = '<All>'

David Portas
SQL Server MVP

Jul 23 '05 #2
thanks for the quick response...i'll give it a try!

David Portas wrote:
... WHERE qarep = @myqarep
OR @myqarep = '<All>'

David Portas
SQL Server MVP

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by berthelot samuel | last post: by
3 posts views Thread by JIMMIE WHITAKER | last post: by
2 posts views Thread by jaYPee | last post: by
5 posts views Thread by ndn_24_7 | last post: by
18 posts views Thread by Bill Smith | last post: by
1 post views Thread by peaceburn | last post: by
4 posts views Thread by Simon Gare | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.