Insert Into PLAN_MAIN (
plan_relative_id,
plan_code,
plan_type_code,
plan_create_time,
plan_begin_time,
plan_end_time,
plan_bill_date,
plan_status,
plan_creater,
plan_from_dept,
plan_to_dept,
plan_from_user,
plan_to_user,
plan_remark,
plan_flag,
plan_confirm_time,
plan_confirm_user
)Values(
#PLAN_RELATIVE_ID#,
#PLAN_CODE#,
#PLAN_TYPE_CODE#,
#PLAN_CREATE_TIME#,
#PLAN_BEGIN_TIME#,
#PLAN_END_TIME#,
#PLAN_BILL_DATE#,
#PLAN_STATUS#,
#PLAN_CREATER#,
#PLAN_FROM_DEPT#,
#PLAN_TO_DEPT#,
#PLAN_FROM_USER#,
#PLAN_TO_USER#,
#PLAN_REMARK#,
#PLAN_FLAG#,
#PLAN_CONFIRM_TIME#,
#PLAN_CONFIRM_USER#
)
select @@IDENTITY as value
Update PLAN_MAIN Set
plan_relative_id=#PLAN_RELATIVE_ID#,
plan_code=#PLAN_CODE#,
plan_type_code=#PLAN_TYPE_CODE#,
plan_create_time=#PLAN_CREATE_TIME#,
plan_begin_time=#PLAN_BEGIN_TIME#,
plan_end_time=#PLAN_END_TIME#,
plan_bill_date=#PLAN_BILL_DATE#,
plan_status=#PLAN_STATUS#,
plan_creater=#PLAN_CREATER#,
plan_from_dept=#PLAN_FROM_DEPT#,
plan_to_dept=#PLAN_TO_DEPT#,
plan_from_user=#PLAN_FROM_USER#,
plan_to_user=#PLAN_TO_USER#,
plan_remark=#PLAN_REMARK#,
plan_flag=#PLAN_FLAG#,
plan_confirm_time=#PLAN_CONFIRM_TIME#,
plan_confirm_user=#PLAN_CONFIRM_USER#
plan_id=#PLAN_ID#
Delete From PLAN_MAIN
plan_id=#PLAN_ID#