I have several queries in SQL Server 2012 that use the intrinsic system function IIf. I need to port these to a SQL Server 2008 R2 system that does not have IIf as an intrinsic system function. Does anyone have a user defined dbo.IIf function you're willing to share that I can use in place of the IIf intrinsic function? Thanks, Eddie