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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 raiserror

Author  Topic 

sent_sara
Constraint Violating Yak Guru

377 Posts

Posted - 2007-06-20 : 10:52:55
can anybody help on how to raiserror for date datattype

raiserror(@dt,16,2)
return


harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-20 : 10:55:26
[code]
declare @sVar varchar(20)
Set @sVar = cast(@dt as varchar(20))
RAISERROR('Error occurred for %s', 16, 2, @sVar)[/code]

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

- Advertisement -