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 |
|
fmardani
Constraint Violating Yak Guru
433 Posts |
Posted - 2006-02-09 : 16:51:53
|
| I would like to make use of the new error handling in sql server 2005Could you please see if this sql is ok (It does compile)CREATE PROCEDURE uspGetDataASdeclare @Error intdeclare @Msg varchar(128)set nocount onbegin try select SectionID, SectionTitle from RISECT01 order by SectionTitleend trybegin catch SET @Msg = 'Cannot retrieve Sections from Table' RAISERROR (@Msg, 16, 1) RETURN(@@Error)end catchset nocount off |
|
|
|
|
|