francesguan
Technical User
Hi,
I am creating Order Verification report(OV) which for shooting out automatically by Visual Cut. in the Stored procedure for OV,I am trying to force the data into a table:FR_OVLog and delete the data from another table:FR_OV; so every time report running, it will delete data from table FR_OV and add whatever shown in the report to table FR_OVLog;
please note in the following whenever I add insert and delete lines inside, crystal report won't be able to recognize the sp any more, but sql could be excuted successfully.
any comments would be greatly appreciated.
Frances
---------------------------------------
the structure in this SP:
open CoAllcrs --cursor for co_all table
.....
open coItemAllcrs--cursor for coitem_all table
.....
insert into FR_OVLog(co_num,co_line,co_release)
select @CoCoNum, @CoitemCoLine, @CoitemCorelease from @ReportSet
delete from FR_OrderVerification where FR_OrderVerification.co_num=@CoCoNum and FR_OrderVerification.co_line=@CoitemCoLine and FR_OrderVerification.co_release=@CoitemCorelease
....
close coItemAllcrs
.....
close CoAllcrs
SELECT *
FROM @ReportSet
.....
EXIT_SP:
....
I am creating Order Verification report(OV) which for shooting out automatically by Visual Cut. in the Stored procedure for OV,I am trying to force the data into a table:FR_OVLog and delete the data from another table:FR_OV; so every time report running, it will delete data from table FR_OV and add whatever shown in the report to table FR_OVLog;
please note in the following whenever I add insert and delete lines inside, crystal report won't be able to recognize the sp any more, but sql could be excuted successfully.
any comments would be greatly appreciated.
Frances
---------------------------------------
the structure in this SP:
open CoAllcrs --cursor for co_all table
.....
open coItemAllcrs--cursor for coitem_all table
.....
insert into FR_OVLog(co_num,co_line,co_release)
select @CoCoNum, @CoitemCoLine, @CoitemCorelease from @ReportSet
delete from FR_OrderVerification where FR_OrderVerification.co_num=@CoCoNum and FR_OrderVerification.co_line=@CoitemCoLine and FR_OrderVerification.co_release=@CoitemCorelease
....
close coItemAllcrs
.....
close CoAllcrs
SELECT *
FROM @ReportSet
.....
EXIT_SP:
....