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 2000 Forums
 Transact-SQL (2000)
 Database Trigger "Raiserror"

Author  Topic 

LMS56K
Starting Member

6 Posts

Posted - 2002-01-22 : 11:34:51
Hello,

I have created a trigger with the following raiserror command.

RAISERROR 50001 " A Potential Fault has just been logged by "

Is there a way that I can insert a database field (User ID) into this raiserror message? For Example.

RAISERROR 50001 " A Potential Fault has just been logged by User ID "

Many Thanks,

Lee



How much do you know about yourself if you've never been in a fight?

nr
SQLTeam MVY

12543 Posts

Posted - 2002-01-22 : 11:54:23


raiserror('bad user = %d',16,-1,@userid)

But you could do this by creating a string for the message and concatenating the field.


==========================================
Cursors are useful if you don't know sql.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -