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 |
|
MagnusD
Starting Member
2 Posts |
Posted - 2011-06-06 : 06:50:11
|
| I need help with TRIGGERS and PROCEDURES in T-SQL. I created a procedure that calculates a field that is in a table. Say for example, in the table belowTABLE ITEMS (Order, Info, Item, Quantity)I created a procedure called CalculateInfo to perform a calculation on InfoCREATE PROCEDURE CalculateInfoBEGIN [calculation on Info]END now I use that procedure on a trigger that will insert that calculation to another procedure. So the trigger goes like thisCREATE TRIGGER PutInLineOrder ON ITEMS FOR INSERTASBEGIN EXECUTE CalculateInfo;END;So the trigger performs the execution of a procedure and the expectation is that whatever the value is then placed into another procedure. How am I going to execute this in which the calculation is a procedure and then that procedure is executed from a trigger which inserts the value to a procedure that performs an INSERT INTO a table. Please let me know. Thank you!Regi Etna |
|
|
MagnusD
Starting Member
2 Posts |
Posted - 2011-06-06 : 06:51:01
|
| oh you can email me directly by the way if you have an answer to my question at mondetrotter@yahoo.com. Thank you!Regi Etna |
 |
|
|
|
|
|