Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Case Expression

Author  Topic 

u2p_inst
Yak Posting Veteran

78 Posts

Posted - 2003-10-12 : 03:53:56
dear all,

i'm trying to use Select case in query:

Select Case when(a is null and b is not null) or (c is null and d is not null) from table1

something is wrong because i get an error

thanks!

oh

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2003-10-12 : 03:56:53
Each CASE statement needs a THEN and an END

SELECT CASE WHEN some condition THEN do this ELSE do something else END

Owais


Make it idiot proof and someone will make a better idiot
Go to Top of Page

u2p_inst
Yak Posting Veteran

78 Posts

Posted - 2003-10-12 : 04:47:09
thanks Owais

oh
Go to Top of Page
   

- Advertisement -