Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Create function

Author  Topic 

asuni
Yak Posting Veteran

55 Posts

Posted - 2010-03-25 : 01:20:54
Hi All,

I am using SQL Server 2005, with compatibility level SQL server 7.0(70).
so, i am not able to create function.
I am getting error as
"You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the stored procedure sp_dbcmptlevel."

I changed the compatibility level to SQL Server 2005(90).
So, not i am able to create the function.

But my question is i have to use the compatibility level SQL server 7.0(70), in this how i can create user defined function.

thanks

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-03-25 : 01:26:56
UDF functions were introduced in SQL Server 2000 so you need to use compatibility level of 80 or higher.
I don't think that you can create fucntion with compatibility level SQL server 7.0(70).

Regards,
Bohra.

I am here to learn from masters and help new bees in learning.
Go to Top of Page

asuni
Yak Posting Veteran

55 Posts

Posted - 2010-03-25 : 01:28:37
ok, thank you very much
Go to Top of Page

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-03-25 : 01:29:15
A quick question..

When u have sql server 2005, why you want to work with compatibility level SQL server 7.0(70). I know there must be reason for it.

If you can tell the need for that compatibility level,it may be possible that we can give better suggestion.

Regards,
Bohra.

I am here to learn from masters and help new bees in learning.
Go to Top of Page

asuni
Yak Posting Veteran

55 Posts

Posted - 2010-03-25 : 01:36:35
Actually i am using SQL Server 2005 as back end, Centura team developer as a front end.
So in the sql server 2005 compatibility level i am getting error at outer join, so i changed the compatibility level to SQL server 7.0(70). when i changed it is working fine.
so i changed.

thanks
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-03-25 : 04:19:58
quote:
Originally posted by asuni

Actually i am using SQL Server 2005 as back end, Centura team developer as a front end.
So in the sql server 2005 compatibility level i am getting error at outer join, so i changed the compatibility level to SQL server 7.0(70). when i changed it is working fine.
so i changed.

thanks


you must be using the old join method. Change it to ANSI join syntax

use LEFT JOIN or RIGHT JOIN


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -