【正文】
om_ID_DEL char(10),Ticket_ID_ALT char(17)Select Order_ID_DEL=Order_ID,Custom_ID_DEL=Custom_ID,Ticket_ID_ALT=Ticket_ID from deletedupdate Ticket_List set Sell_flag=0where Ticket_ID=Ticket_ID_ALTdelete from Custom_Twhere Custom_ID=Custom_ID_DELendgoDELETE from dd_T where Order_ID=39。,39。,39。,40,39。,39。,39。,39。exec Pro_QTicsCinf starttime,endtime,sSell_operator,sSell_amount_out output,sSell_money_out outputselect sSell_operator as 營業(yè)員,sSell_amount_out as 銷售門票數(shù)量,sSell_money_out as 收費(fèi)總金額5 觸發(fā)器,自動更改門票標(biāo)志位create trigger TRIGGER_BUY_TICon dd_T for insertasbeginDeclare Ticket_ID_IN char(17)Select Ticket_ID_IN=Ticket_ID from insertedupdate Ticket_List set Sell_flag=1where Ticket_ID=Ticket_ID_INendinsert into dd_T values(39。13exec Pro_QTicsCinf starttime,endtime,sSell_operator,sSell_amount_out output,sSell_money_out outputselect sSell_operator as 營業(yè)員,sSell_amount_out as 銷售門票數(shù)量,sSell_money_out as 收費(fèi)總金額select sSell_operator=39。select sSell_operator=39。select endtime=39。exec Pro_QTicsPinf starttime,endtime,sTicket_type,sTicket_Price_out output,sSell_amount_out output,sSell_money_out outputselect sTicket_Price_out as 門票價格,sSell_amount_out as 門票數(shù)量,sSell_money_out as 門票金額create Procedure Pro_QTicsCinfstarttime datetime,endtime datetime, sSell_operator nvarchar(10),sSell_amount_out int output,sSell_money_out decimal(5, 2) outputAS select sSell_amount_out=count(Ticket_ID),sSell_money_out=sum()from dd_Twhere sSell_operator= and Sell_date between starttime and endtimegroup by Sell_operatordeclare starttime datetime, endtime datetime,sSell_operator nvarchar(10),sSell_amount_out int , sSell_money_out decimal(5, 2) select starttime=39。exec Pro_QTicsPinf starttime,endtime,sTicket_type,sTicket_Price_out output,sSell_amount_out output,sSell_money_out outputselect sTicket_Price_out as 門票價格,sSell_amount_out as 門票數(shù)量,sSell_money_out as 門票金額select sTicket_type=39。exec Pro_QTicsPinf starttime,endtime,sTicket_type,sTicket_Price_out output,sSell_amount_out output,sSell_money_out outputselect sTicket_Price_out as 門票價格,sSell_amount_out as 門票數(shù)量,12sSell_money_out as 門票金額select sTicket_type=39。select sTicket