Hi folks!
I'm hoping for some SQL wizardry workaround from y'all. My problem is as follows:
I have a Windows desktop application that users install on their systems. The install does normal install things, but most importantly it runs a SQL script that creates and populates a SQL Server database. Currently this works perfectly on SQL Server 2012 R2. One customer I am supporting would like it to work on SQL Server 2008 R2. I cannot edit my code due to some business reasons that I won't go into. My SQL script fails on 2008 because it uses the built-in PARSE function, which is only available on 2012. My SQL is similar to this (yes, this is somewhat contrived):
SET @MyInt = (SELECT (PARSE('99999' AS int)) + 50
What I would like to do is allow this to run on SQL Server 2008 R2. I tried creating a user-defined function named PARSE but that didn't work because a UDF needs to be specified using a schema name (e.g. dbo.PARSE).
Does anyone have any ideas how I can allow this to be installed on SQL SERVER 2008 R2?
Any help is greatly appreciated