July 26, 2018 at 2:28 am
Dear All,
It is possible to use try..catch in SQL statement. below is the my query
begin try
select 1/0
end try
begin catch
print 'error'
end catch
July 26, 2018 at 5:37 am
That should work in SQL 2008. What's the problem?
July 26, 2018 at 6:21 am
laurie-789651 - Thursday, July 26, 2018 5:37 AMThat should work in SQL 2008. What's the problem?
If one divided by zero, then should be throw an error but print error message instead of 'No column name'
July 26, 2018 at 6:26 am
sunilkmr284 - Thursday, July 26, 2018 6:21 AMlaurie-789651 - Thursday, July 26, 2018 5:37 AMThat should work in SQL 2008. What's the problem?If one divided by zero, then should be throw an error but print error message instead of 'No column name'
Click on the messages tab and you will find it there.
Sue
July 26, 2018 at 6:36 am
Sue_H - Thursday, July 26, 2018 6:26 AMsunilkmr284 - Thursday, July 26, 2018 6:21 AMlaurie-789651 - Thursday, July 26, 2018 5:37 AMThat should work in SQL 2008. What's the problem?If one divided by zero, then should be throw an error but print error message instead of 'No column name'
Click on the messages tab and you will find it there.
Sue
Thanks, it's there.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply