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.
| Author |
Topic |
|
mary_itohan
Posting Yak Master
191 Posts |
Posted - 2008-10-02 : 10:02:20
|
Am trying to run a SP from an inserted value called successful, but it doesnt seem to runWhat is wrong here ?Am trying to run a SP Based on an inserted value called sucessful (columnn)It doesnt update the fieldALTER TRIGGER [dbo].[T_Send_Execution]ON [dbo].[Cnt_Billing_Transactions]FOR UPDATE AS --Successfuldeclare @TransactionID intselect @TransactionID = (select successful from inserted)exec [dbo].[SP_Execute_Send_TransactionID]@transactionidUSE [cellulant]GO/****** Object: StoredProcedure [dbo].[SP_Execute_Send TransactionID] Script Date: 10/02/2008 14:56:26 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER PROCEDURE [dbo].[SP_Execute_Send_TransactionID] ( @return int )ASupdate Cnt_Billing_Transactions set smsstatus = @return where transactionID = @return |
|
|
ashraff87
Starting Member
17 Posts |
Posted - 2008-10-02 : 12:54:34
|
| does your update update only one row by specifiying the full primary key?if not, if the update is updating a number of rows there will be an issue hereselect @TransactionID = (select successful from inserted)I dont know if this is your problem, but ive noticed it might be one in the future.Also dont call all your Stored Procs SP_...blah, it causes performance issues when they all being with sp_As for the issue im sorry i cant see anythign, please explain the behaviour further, are those triggers and Sprocs being created or does it fail to even create them?or do they just not work when you use them? |
 |
|
|
mary_itohan
Posting Yak Master
191 Posts |
Posted - 2008-10-02 : 13:55:26
|
| TransactionID is the PK._____________________Yes O ! |
 |
|
|
|
|
|