SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Find Mismatched Views and Stored Procs


Find Mismatched Views and Stored Procs

Author
Message
Pratap Prabhu
Pratap Prabhu
Old Hand
Old Hand (331 reputation)Old Hand (331 reputation)Old Hand (331 reputation)Old Hand (331 reputation)Old Hand (331 reputation)Old Hand (331 reputation)Old Hand (331 reputation)Old Hand (331 reputation)

Group: General Forum Members
Points: 331 Visits: 153
Comments posted to this topic are about the item Find Mismatched Views and Stored Procs
CAGreensfelder
CAGreensfelder
Old Hand
Old Hand (331 reputation)Old Hand (331 reputation)Old Hand (331 reputation)Old Hand (331 reputation)Old Hand (331 reputation)Old Hand (331 reputation)Old Hand (331 reputation)Old Hand (331 reputation)

Group: General Forum Members
Points: 331 Visits: 375
What version of SQL Server is the for? I'm using SQL2000 and I'm getting lots of odd syntax errors.
Rich.Gamble
Rich.Gamble
SSC Rookie
SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)

Group: General Forum Members
Points: 29 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.
Roman Vinnik
Roman Vinnik
Valued Member
Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)

Group: General Forum Members
Points: 63 Visits: 141
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.
Dr Paul Davis
Dr Paul Davis
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 48
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.
Iwas Bornready
Iwas Bornready
SSC-Dedicated
SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)

Group: General Forum Members
Points: 34870 Visits: 886
Thanks for the script.
Iwas Bornready
Iwas Bornready
SSC-Dedicated
SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)

Group: General Forum Members
Points: 34870 Visits: 886
This will be really helpful.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search