Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different behaviour Agent Job and Query Window

Status
Not open for further replies.

peac3

Technical User
Jan 17, 2009
226
AU
Hi guys,

I have stored proc in pseudo code as below:
Code:
query_1

query_2

query_3

There is an issue in query_2 due to data conversion but the stored proc continues until the end and the last query (query_3) was running fine hence the return code is 0 and we have seen it from query window
Then we are trying to run this stored proc via SQL Agent job and it bombs out when it runs the query_2.

Do you guys have any idea why they behave different way while execute the same stored proc? it gives us inconsistent result and we never knew query_2 had an issue.
And how to force to finish the whole stored proc as run in query window in SQL Agent job.

Stored proc compiled with no errors.

Thanks in advance guys,

 
Fix your data conversion issue.

You've got questions and source code. We want both!
Here at tek tips, we provide a hand up, not a hand out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top