Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Raiserror for datetime,numeric datatype

Author  Topic 

sent_sara
Constraint Violating Yak Guru

377 Posts

Posted - 2007-04-09 : 03:44:37
Hi guys,
Can anybody tell how to raise an error for a datatype datatime and numeric.txs in advance

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-09 : 03:48:37
if you are using proper data type, you will not have invalid value in the table.


KH

Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-09 : 04:42:22
There is no separate error handling mechanism for datetime and numeric data types. It is always using @@error variable in SQL 2000 or using TRY...CATCH() block in SQL 2005.

For specific syntax, you can check Books online.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-04-10 : 06:59:09
www.sommarskog.se/error-handling-I.html
www.sommarskog.se/error-handling-II.html


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -