SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On



Find Mismatched Views and Stored Procs Expand / Collapse
Author
Message
Posted Wednesday, June 04, 2008 9:28 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, February 22, 2010 4:34 AM
Points: 94, Visits: 113
Comments posted to this topic are about the item Find Mismatched Views and Stored Procs
Post #511482
Posted Tuesday, July 15, 2008 6:33 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, March 18, 2010 3:06 PM
Points: 56, Visits: 359
What version of SQL Server is the for? I'm using SQL2000 and I'm getting lots of odd syntax errors.
Post #534295
Posted Tuesday, July 15, 2008 7:11 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, February 02, 2010 7:44 AM
Points: 4, Visits: 70
Provided script failed to create sp_utl_FindMisMatchedObjects in SQL Server 2005 with the following error:
Msg 4145, Level 15, State 1, Procedure sp_utl_FindMisMatchedObjects, Line 26
An expression of non-boolean type specified in a context where a condition is expected, near 'or'.
Msg 102, Level 15, State 1, Procedure sp_utl_FindMisMatchedObjects, Line 27
Incorrect syntax near ')'.

-- End of Post.
Post #534350
Posted Tuesday, July 15, 2008 1:17 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, January 22, 2010 3:06 AM
Points: 8, Visits: 36
Rich.Gamble (7/15/2008)
Provided script failed to create sp_utl_FindMisMatchedObjects in SQL Server 2005 with the following error:
Msg 4145, Level 15, State 1, Procedure sp_utl_FindMisMatchedObjects, Line 26
An expression of non-boolean type specified in a context where a condition is expected, near 'or'.
Msg 102, Level 15, State 1, Procedure sp_utl_FindMisMatchedObjects, Line 27
Incorrect syntax near ')'.

-- End of Post.


Change
if(not (select * from sys.databases WHERE name =@strDBName1)
or not exists(select * from sys.databases WHERE name =@strDBName2)

to

if(not exists (select * from sys.databases WHERE name =@strDBName1)
or not exists(select * from sys.databases WHERE name =@strDBName2)

Otherwise, a handy procedure.

PS: it doesn't run in 2000, only in 2005.
Post #534710
« Prev Topic | Next Topic »


Permissions Expand / Collapse