The case has only 1 when and an else, so it is the same as iff.
:smile:
On Jun 24, 2013 7:41 PM, "Chris Maish" <notifications@github.com> wrote:

> In JabbR/Migrations/201306240509060_EnhanceChatUserBanFlag.cs:
>
> > @@ -0,0 +1,21 @@
> > +namespace JabbR.Models.Migrations
> > +{
> > +    using System;
> > +    using System.Data.Entity.Migrations;
> > +
> > +    public partial class EnhanceChatUserBanFlag : DbMigration
> > +    {
> > +        public override void Up()
> > +        {
> > +            AddColumn("dbo.ChatUsers", "BanStatus", c => c.Int(nullable: false));
> > +            Sql("UPDATE dbo.ChatUsers SET BanStatus = CASE WHEN IsBanned = '1' THEN '1' ELSE '0' END");
>
> IIF is only available on Azure and SQL 2012.
>
> I know of at least 1 production deployment of Jabbr that uses SQL 2008 R2
> (plus my local machine uses it too), so I didn't want to drop that
> compatibility at this stage (not that I'm particularly married to it
> working on older infrastructure...)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/JabbR/JabbR/pull/908/files#r4856475>
> .
>