[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 7384
  • Last Modified:

"Query completed with errors." - but there are no errors...

When I execute a particular stored procedure in SQL Server 2000 Query Analyzer, the procedure completes and the results pane shows the number of records affected by the procedure. (The number of records affected indicate that the procedure completed successfully. Also, the correct number of records are inserted into a table.) However, the bottom of the query analyzer window says that the "query batch completed with errors." The result pane does not show any errors, only how many records were affected. Unfortunately, the procedure won't complete at all when it is called from a SQL Server job. The job reports failure, and the procedure does not insert all of the records into the table.

All the procedure does is select values into variables from various tables and then insert records into a table.

What might cause this? Is there a way to trap "soft" errors so I can see what is happening?

Your help is much appreciated.
0
dbaGrant
Asked:
dbaGrant
1 Solution
 
DonKronosCommented:
In QA click on the Messages tab (right next to the Results tab).  It will show the errors.
0
 
dbaGrantAuthor Commented:
No, there are no errors listed on the messages tab.  All the messages tab shows is the number of rows affected.  That is what is confusing.  Usually, if there is an error, you see it.  The only indication that there is an error here is that the status bar says "Query batch completed with errors."
0
 
DonKronosCommented:
You can test @@ERROR after each SQL statement to determine which statements are giving you errors.
0
 
imran_fastCommented:
>>then insert records into a table.
Does those tables have any triggers on them?
0
 
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
Run a Profiler Trace taking all the "Error and Warnings" section as it may give you more precise indication to the nature of the error (last statement executed before the error warning)...Hope this helps...
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now