Script error
From: CC&JM (anonymous_at_discussions.microsoft.com)
Date: 08/03/04
- Next message: Tim: "Re: script - add SQL login"
- Previous message: Rick Sawtell: "Re: defrag for a SQL Server?"
- Next in thread: James Luetkehoelter: "Script error"
- Reply: James Luetkehoelter: "Script error"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 3 Aug 2004 09:19:07 -0700
Hello,
Iīve done one script where i verify the sql server version
and the output return the corresponding collations. First
is checked if the version is "SQL Server 7.0" and if it is
executes sp_helpsort, if it isnīt SQL 7.0 there are a lot
of steps and one query where is referenced the
serverproperty('collation').
The problem is that im trying this and the following error
is returned:
"Server: Msg 195, Level 15, State 10, Line 2
'serverproperty' is not a recognized function name"
but if i comment the query the script runs without any
problem.
How is this possible?
It should not be possible that this part of the script
were checked since the @@version of the server is 7.0 and
so theres no nedd to check the else statement
I cant understand, down i write a coople of lines used in
the script.
if (select substring(@@version,1,23)) = 'Microsoft SQL
Server 7'
begin
exec sp_helpsort
end
else
begin
.
.
.
select [Server Name] = @@servername,
[Server Default Collation] = convert(char
(50),serverproperty('collation'))
end
Hope that you can help me
Regards
- Next message: Tim: "Re: script - add SQL login"
- Previous message: Rick Sawtell: "Re: defrag for a SQL Server?"
- Next in thread: James Luetkehoelter: "Script error"
- Reply: James Luetkehoelter: "Script error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|