How to change query from SQL Server 2012 to SQL Server 2008 R2 -


select      @principal= iif(optionfieldvalue='', null, cast(optionfieldvalue decimal(38, 18)))      @data       templatefieldid = 47 

this query written in sql server 2012. want change sql server 2008 r2.

can 1 convert code

just rid of iif new in sql server 2012:

select      @principal = case                     when optionfieldvalue = ''                        cast(null decimal(38,18))                       else cast(optionfieldvalue decimal(38, 18))                  end      @data       templatefieldid = 47 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -