I have to create a proc on the following condition
o The procedure would update the record in the table TBL_LOG on the basis of the Log Id provided as a parameter. The following information would be inserted:
logid - id of the record which need to be updated in the tbl_log
status - status is passes as a paramter to the procedure
userid - user id is passed as a paramter
dateup - current dateand time when record is inserted
If the Status = “Success” and if the ORDER_STATUS_CD = “ORIGINAL COPY” in TBL_ORDER for the oRDER number from TBL_LOG then call the procedure sp_secondproc which would update the status of the invoice. The new status would be “ORIGINAL COPY SENT”.
Create proc proc1
@LogId int ,
@Status Char(2) ,
@userid int
as
begin
SELECT @LogId = logid FROM dbo.tbl_order where status = @Status
SELECT
IF(@lStatus = 'Success' A ...
Go to the complete details ...