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
 SQL Server Development (2000)
 CASE + Invaild column name

Author  Topic 

Qnavry
Starting Member

4 Posts

Posted - 2009-01-05 : 15:53:49
I am getting a error when I run the select statement below. I know this is probably a easy fix. what am I missing?

select
case col1 when 46 then 'Yes' else 'No' end as Test,
col2,col3 from table1
where Test = 'No'

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-01-05 : 16:22:00
Dupe Post - please don't cross post.

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=117212

Be One with the Optimizer
TG
Go to Top of Page

ashishashish
Constraint Violating Yak Guru

408 Posts

Posted - 2009-01-06 : 04:57:51
Avoid Duplicate Post if u want to get answers in proper.
Go to Top of Page
   

- Advertisement -