Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6185357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:41:43+00:00 2026-05-24T01:41:43+00:00

TSQL here. Specifically Server 2008(literally just upgraded) Concerning stored procedures: Try/Catch I was trying

  • 0

TSQL here. Specifically Server 2008(literally just upgraded)

Concerning stored procedures: Try/Catch

I was trying to make a list of cases when a Select Statement will throw an exception. The ones I can think of are syntax related(includes null variables) and divide by zero. I’m only guessing there are just a whole boat load of them for Insert/Alter and Create/Truncate.

If you happen to know of a good source link, that would be great.

This question came up when I was reading this exhaustive blog post about error handling for SQL server. It’s titled for SQL Server 2000, but I think most of it still applies.

edit

Sorry, I meant to link this earlier. . .

http://msdn.microsoft.com/en-us/library/aa175920(v=sql.80).aspx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:41:44+00:00Added an answer on May 24, 2026 at 1:41 am

    Outside for compile (“didnt’ run”) errors, you have at least these runtime errors

    • arithmetic errors
      These change based on various SET statement
      Example: get sql server to warn about truncation / rounding

    • overflow errors
      example: one of the rows overflows smallint in some calculation

    • CAST errors
      eg you try ISNUMERIC in a WHERE or CASE and try to cast ‘bob^’ or 1.23 to int
      See Why use Select Top 100 Percent?

    However, you’d always want to use TRY/CATCH though, surely…?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm migrating a TSQL stored procedure to PL/SQL and have encountered a problem -
Is there a way to make a TSQL variable constant?
I've got a T-SQL stored procedure running on a Sybase ASE database server that
Here is an example of some TSQL that I would like to rewrite in
I'm in need of some basic TSQL help. Here's my table layout: Orders Table
I have a TSQL script that is used to set up a database as
Are there any inherent problems with calling an ole object from tsql? I have
I need to wrap a few strings in single quotes for a dynamic TSQL
Do T-SQL queries in SQL Server support short-circuiting? For instance, I have a situation
...specifically, the fn_listextendedproperty system function in MSSQL 2005. I have added an Extended Property

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.