Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-03-28 : 21:08:16
|
Raymond writes "I am a mainframe developer trying to teach myself SQL Server 2000 running on Windows 2000 Server so I have many 101 questions. Here are a few:
I am running a script, which executes a stored procedure, which in turn calls a second stored procedure. If I encounter an error in the second procedure, I want to quit the entire script -- no rollbacks, just quit.
Is there an ABEND/ABORT/EXIT/QUIT statement, which I can use to cancel the script? I could use RAISERROR and/or RETURN to back out level-by-level, but I think that approach is overly complicated; and is not needed for this application.
Or, what do I have to do to get SQL Server to allow me to generate an error code of 20 or greater using RAISERROR?
Also...
This code:
if object_id('tempdb..#a') is not null drop procedure #a GO create PROCEDURE #a AS select 'a' go
generates this message in the log for OSQL:
Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object '#a'. The stored procedure will still be created.
How can I suppress the message?
Thanks -- best SQL Server related site I,ve found so far -- sure hope someone has some answers!" |
|
|
|
|
|