Re: Can error messages in Query Analyzer be suppressed?
From: Aaron Bertrand - MVP (aaron_at_TRASHaspfaq.com)
Date: 05/20/04
- Next message: Aaron Bertrand - MVP: "Re: Disabling a trigger"
- Previous message: Gregory A. Larsen: "Re: Creating temp table"
- In reply to: Tom Edelbrok: "Can error messages in Query Analyzer be suppressed?"
- Next in thread: roger: "Re: Can error messages in Query Analyzer be suppressed?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 20 May 2004 17:24:26 -0400
> It works great, but if the table doesn't already exist, I get an annoying
> error message
You can't suppress this. But you can execute your drop statement
conditionally. See http://www.aspfaq.com/2458 (scroll down)
> This code works great if run standalone, but if included in my script, the
> script will always give an error further down at the point where I try to
> create #worktable (saying that it already exists).
If you're just running this in Query Analyzer, you can separate with GO or
just always CREATE #temp tables at the top and DROP them at the bottom.
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/
- Next message: Aaron Bertrand - MVP: "Re: Disabling a trigger"
- Previous message: Gregory A. Larsen: "Re: Creating temp table"
- In reply to: Tom Edelbrok: "Can error messages in Query Analyzer be suppressed?"
- Next in thread: roger: "Re: Can error messages in Query Analyzer be suppressed?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|