Operations Log
To keep track of what information is affect by a procure, we can create an audit table, where the Process ID that was involv in the entry, deletion or update of the record will be written. For example, let’s suppose that the body of our procure for recording commissions contains the instruction:
INSERT INTO COMMISSION (EmployeeId, Commission)
Immiately after (and within the same transaction) we could place the following instruction, referring to our process catalog:
INSERT INTO LOG_OPERACION ProcessId ProcessDesc GetDate
>>lass=”yoast-text-mark” />>Where @ProcessId has the value of 1, and Process Desc contains the text enter by the user to justify this commission. This is very useful for tracking information and can even be a security or compliance requirement in a corporation.
If you do not have tools with debugging capabilities for stor procures, you can use the Select statement to find out the values that the variables take when executing the process, for example:
Avoiding duplicate execution
>>>Let’s imagine that we run our procure to calculate sales bulgaria phone number library commissions and it enters the information into a table. What would happen if we were to run the same process again by mistake? Well, it’s not hard to imagine, we is working with influencers still profitable? would have duplicate information. To avoid this, we can taiwan lead rely on our log table, checking whether our operation has been execut recently, before executing it. At the interface level, we could show the user a more descriptive message.
Debugging variables.