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.
| Author |
Topic |
|
cindylee
Yak Posting Veteran
55 Posts |
Posted - 2006-02-23 : 19:57:36
|
| Hi guysi tried to create the followin function on one of our database(compt level 65). getting the error : Server: Msg 170, Level 15, State 1, Line 1Line 1: Incorrect syntax near 'FUNCTION'.but its workin fine on test database(compt level 80) .Anyone know the script db level 65 ThanksCREATE FUNCTION dbo.test(@client int)RETURNS VARCHAR(5000)ASBEGIN DECLARE @Output VARCHAR(5000) SELECT @Output = COALESCE(@Output+'; ', '') + CONVERT(varchar(250), [title]) + '-'+ CONVERT(varchar(75), [call]) + '-$' + Convert(Varchar(25),price/100) FROM testtable where [id] = @client RETURN @OutputENDThanks |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-02-23 : 20:01:30
|
| Compatibility level of 65 means you are using SQL Server 6.5 features. User-defined functions are not available until SQL Server 2000, which is compatibility level 80. So you can't create functions in 65 compatibility level.Tara Kizeraka tduggan |
 |
|
|
cindylee
Yak Posting Veteran
55 Posts |
Posted - 2006-02-23 : 20:08:44
|
| ohhh k..guess i have to use procedure then. Thanks TaraCindy |
 |
|
|
|
|
|