February 3, 2004 at 11:14 am
Consider the following code:
use savbr declare @reccnt int select TOP 1 @reccnt = Rows FROM sysindexes WHERE id = OBJECT_ID('ACLObjects') AND indid < 2 select @reccnt
In QueryAnalyzer, I can check or run the code. In ONE PARTICULAR datatbase (I choose the database from the dropdown or change the USING at the top of this code) I can't run it - it reports a syntax error, specifically
Server: Msg 170, Level 15, State 1, Line 3 Line 3: Incorrect syntax near '1'.
The database is 'Sellstation'. Anyone seen this? Now, remember this is a syntax error, not an execution error, so it doesn't matter what's in the call to Object_ID. In fact this was originally inside a cursor and the call held a parameter, i.e.
OBJECT_ID(@tName)
and it still died. What's up?
Win2KSP4 SQL2kSP3
a chavez
-------
at us, very deafly, a most stares
collosal hoax of clocks and calendars
eecummings
February 3, 2004 at 11:31 am
Run sp_helpdb and check the Compatibility_Level values.
--Jonathan
February 3, 2004 at 11:45 am
6.5
'nuf said. Thx
-------
at us, very deafly, a most stares
collosal hoax of clocks and calendars
eecummings
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy