cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SQL Function problem

Former Member
0 Likes
346

Hello Everyone,

I have created a function in SQL Server 2005 through coding using Sapbobs->Recordset Object.It works well in Sql Server 2005.But on a machine using SQl Server 2000 the same doesnt work.What could be the problem.Updating the machine to 2005 is not an option.Do i have to change anything in coding for create function?

Please help

raghu

View Entire Topic
Former Member
0 Likes

In 2000 should be other syntax. Try to create the function in management studio and check, if you will receive some syntax error.

Former Member
0 Likes

Got it,

In the function i'm using CTE(Common table Expression).I think this concept is from 2005 onwards.I dont know what is the equivalent for it in 2000.How can i change it for 2000.

Former Member
0 Likes

Yes, CTE is for 2005 and 2008 only. Youll have to change it to tmp tables. Nice explanation is at

http://www.databasejournal.com/features/mssql/article.php/3502676

Former Member
0 Likes

How can i determine if a client is using SQL server 2005 or 2000.

Former Member
0 Likes

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

Former Member
0 Likes

I tried to use temporary tables in place of CTE,but the problem it says is


Cannot acces temporary tables from within a function

Former Member
0 Likes

send code for your function