|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, March 18, 2013 5:11 AM
Points: 139,
Visits: 143
|
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Thursday, February 16, 2012 7:34 PM
Points: 59,
Visits: 375
|
|
| What version of SQL Server is the for? I'm using SQL2000 and I'm getting lots of odd syntax errors.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, May 18, 2012 7:50 AM
Points: 5,
Visits: 98
|
|
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.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Friday, April 19, 2013 3:02 AM
Points: 11,
Visits: 87
|
|
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.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 20, 2013 11:17 PM
Points: 1,
Visits: 17
|
|
| Amazingly, I was starting to write something like this - select from sysobjects into temporary tables, etc, when my e-mail went boing and this arrived - excellent script, and PERFECT TIMEING thank you very much.
|
|
|
|