database
newsgroups
Home
All Groups
Group
Topic
Archive
Search
About
Using CASE in SEECT
microsoft.public.sqlserver.programming
18 Sep 2006 8:42 PM
Mark Goldin
Can I have CASE for something like this:
........
........
where id in
case @TestVal
when 1 then
(select min(id) as id from ......)
else
(select max(id) as id from ....)
end
Thanks for help.
Other interesting topics
Update Statement
SQL query
xp_cmdshell - works with string in one format but not in another -
How to concatenate strings from a column into a single row (with NULL value)?
Query help
related:
SQL database news
MS news
Net developer
Code news
Security news
Windows news
Server news