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)
 what's the problem in this CASE statement

Author  Topic 

Ali.M.Habib
Yak Posting Veteran

54 Posts

Posted - 2009-05-24 : 08:48:51
it give error near IN statement

insert into S -- table name
(A,
B,
c)
select
(
x,y,
case x
when x in (1,2) then 'HI'
else 'NO'


from D)

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-05-24 : 08:55:39
case
when x in (1,2) then 'HI'
else 'NO'




No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-05-24 : 09:02:28
[code]
case
when x in (1,2) then 'HI'
else 'NO'
end
[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-05-24 : 11:03:31
quote:
Originally posted by khtan


case
when x in (1,2) then 'HI'
else 'NO'
end



KH
[spoiler]Time is always against us[/spoiler]




OK, good catch - but you are wearing glasses


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -