语句:select Delivery_Type,EXPRESS_NUM_AUTO, Prev_I_OUT_TICKET_TYPE,Prev_I_TICKET_TYPE,is_print,Prev_Ticket_Group_ID,DECI_UNITPRICE,vc_voucher_no,a.DT_UPDATEDATE,I_ORDER_ID,I_TICKET_QTY,DECI_TOTAL_AMT,I_VOUCHER_TYPE,DECI_DISCOUNT_AMT,DECI_ACTUAL_AMT,USER_NAME,GROUP_NAME,I_OUT_TICKET_TYPE,I_OUT_TICKET_GROUP_ID,I_TICKET_TYPE,DT_CREATEUSER,CUSTOMER_REALNAME,CUSTOMER_MOBILE,
--I_PAYMENT_AMT,
case when a.i_id=b.i_id then a.I_PAYMENT_AMT else 0 end as I_PAYMENT_AMT,
--PAYMENTTYPE,
--b.vc_name as PAYMENTTYPE,
b.group_01 as PAYMENTTYPE,
DT_EVENT_DATETIME,VC_PROGRAM_NAME_CN,ROW_NUMS,vc_remark,scs_another_name,Prev_Order from
(select Delivery_Type,EXPRESS_NUM_AUTO, Prev_I_OUT_TICKET_TYPE,Prev_I_TICKET_TYPE,is_print,Prev_Ticket_Group_ID,i_id,replace(WM_CONCAT(DECI_UNITPRICE),',','/') AS DECI_UNITPRICE,
vc_voucher_no,DT_UPDATEDATE,I_ORDER_ID,I_TICKET_QTY,DECI_TOTAL_AMT,I_VOUCHER_TYPE,DECI_DISCOUNT_AMT,DECI_ACTUAL_AMT,USER_NAME,GROUP_NAME,I_OUT_TICKET_TYPE,I_OUT_TICKET_GROUP_ID,I_TICKET_TYPE,DT_CREATEUSER,CUSTOMER_REALNAME,CUSTOMER_MOBILE,
I_PAYMENT_AMT,I_YUCUN_REAL_V,
PAYMENTTYPE,
DT_EVENT_DATETIME,VC_PROGRAM_NAME_CN,ROW_NUMS,replace(vc_remark,',','/') as vc_remark,scs_another_name,Prev_Order
from DBO.view_scs_viewer_021301_for_011
where vc_program_name_cn not like '%测试%' --AND vc_voucher_no='WH19123000216'
GROUP BY Delivery_Type,EXPRESS_NUM_AUTO,Prev_I_OUT_TICKET_TYPE,Prev_I_TICKET_TYPE,is_print,Prev_Ticket_Group_ID,i_id,vc_voucher_no,DT_UPDATEDATE,I_ORDER_ID,I_TICKET_QTY,DECI_TOTAL_AMT,I_VOUCHER_TYPE,DECI_DISCOUNT_AMT,DECI_ACTUAL_AMT,USER_NAME,GROUP_NAME,
I_OUT_TICKET_TYPE,I_OUT_TICKET_GROUP_ID,I_TICKET_TYPE,DT_CREATEUSER,CUSTOMER_REALNAME,CUSTOMER_MOBILE,I_PAYMENT_AMT,I_YUCUN_REAL_V,PAYMENTTYPE,DT_EVENT_DATETIME,VC_PROGRAM_NAME_CN,ROW_NUMS,vc_remark,scs_another_name,prev_order) a,
dbo.tbl_para_paymenttype b where b.b_enable=1 and DT_CREATEUSER>TRUNC(SYSDATE-500);
你最外层的抽取字段中,没有这个字段啊!!!
你得加上 a.I_YUCUN_REAL_V
select a.I_YUCUN_REAL_V,Delivery_Type,EXPRESS_NUM_AUTO, Prev_I_OUT_TICKET_TYPE,Prev_I_TICKET_TYPE,is_print,Prev_Ticket_Group_ID,DECI_UNITPRICE,vc_voucher_no,a.DT_UPDATEDATE,I_ORDER_ID,I_TICKET_QTY,DECI_TOTAL_AMT,I_VOUCHER_TYPE,DECI_DISCOUNT_AMT,DECI_ACTUAL_AMT,USER_NAME,GROUP_NAME,I_OUT_TICKET_TYPE,I_OUT_TICKET_GROUP_ID,I_TICKET_TYPE,DT_CREATEUSER,CUSTOMER_REALNAME,CUSTOMER_MOBILE,
--I_PAYMENT_AMT,
case when a.i_id=b.i_id then a.I_PAYMENT_AMT else 0 end as I_PAYMENT_AMT,
--PAYMENTTYPE,
--b.vc_name as PAYMENTTYPE,
b.group_01 as PAYMENTTYPE,
DT_EVENT_DATETIME,VC_PROGRAM_NAME_CN,ROW_NUMS,vc_remark,scs_another_name,Prev_Order from
(select Delivery_Type,EXPRESS_NUM_AUTO, Prev_I_OUT_TICKET_TYPE,Prev_I_TICKET_TYPE,is_print,Prev_Ticket_Group_ID,i_id,replace(WM_CONCAT(DECI_UNITPRICE),',','/') AS DECI_UNITPRICE,
vc_voucher_no,DT_UPDATEDATE,I_ORDER_ID,I_TICKET_QTY,DECI_TOTAL_AMT,I_VOUCHER_TYPE,DECI_DISCOUNT_AMT,DECI_ACTUAL_AMT,USER_NAME,GROUP_NAME,I_OUT_TICKET_TYPE,I_OUT_TICKET_GROUP_ID,I_TICKET_TYPE,DT_CREATEUSER,CUSTOMER_REALNAME,CUSTOMER_MOBILE,
I_PAYMENT_AMT,I_YUCUN_REAL_V,
PAYMENTTYPE,
DT_EVENT_DATETIME,VC_PROGRAM_NAME_CN,ROW_NUMS,replace(vc_remark,',','/') as vc_remark,scs_another_name,Prev_Order
from DBO.view_scs_viewer_021301_for_011
where vc_program_name_cn not like '%测试%' --AND vc_voucher_no='WH19123000216'
GROUP BY Delivery_Type,EXPRESS_NUM_AUTO,Prev_I_OUT_TICKET_TYPE,Prev_I_TICKET_TYPE,is_print,Prev_Ticket_Group_ID,i_id,vc_voucher_no,DT_UPDATEDATE,I_ORDER_ID,I_TICKET_QTY,DECI_TOTAL_AMT,I_VOUCHER_TYPE,DECI_DISCOUNT_AMT,DECI_ACTUAL_AMT,USER_NAME,GROUP_NAME,
I_OUT_TICKET_TYPE,I_OUT_TICKET_GROUP_ID,I_TICKET_TYPE,DT_CREATEUSER,CUSTOMER_REALNAME,CUSTOMER_MOBILE,I_PAYMENT_AMT,I_YUCUN_REAL_V,PAYMENTTYPE,DT_EVENT_DATETIME,VC_PROGRAM_NAME_CN,ROW_NUMS,vc_remark,scs_another_name,prev_order) a,
dbo.tbl_para_paymenttype b where b.b_enable=1 and DT_CREATEUSER>TRUNC(SYSDATE-500);