找文章 / 找答案
精选问答 更多内容

字段加不上了

qscdwefvbgrt玄铁一 显示全部楼层 发表于 2021-11-23 11:48:35 |阅读模式 打印 上一主题 下一主题
1
已解决

字段加不上了

2425 3
这个数据集之前可以改动,今天新加了个字段右边一直出不来请问有什么办法么 微信截图_20211123114629.png

语句: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);

新加的字段:I_YUCUN_REAL_V


最佳答案

永洪社区YVP
美滋滋 白银二 关注Ta

2021-11-23 11:48:36

你最外层的抽取字段中,没有这个字段啊!!! 你得加上 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_ ...
查看完整内容
回复

使用道具 举报

精彩评论3

美滋滋白银二 显示全部楼层 发表于 2021-11-23 11:48:36
你最外层的抽取字段中,没有这个字段啊!!!
你得加上 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);
回复

使用道具 举报

_贝贝白银一 显示全部楼层 发表于 2021-11-23 13:08:34
清理写缓存 重连下数据源,刷新下数据集

把sql取出来放在数据库底层能执行吗
回复

使用道具 举报

美滋滋白银二 显示全部楼层 发表于 2021-11-23 13:10:18
本帖最后由 歪打正着 于 2021-11-23 13:11 编辑

另外,你这个SQL针对a和b,没有任何联立关系。。。 查出的结果会有重复数据吧??
我没有看懂,你这个查询,联立dbo.tbl_para_paymenttype 这个表的意义何在。目前来看,没有任何意义,还有可能会使你的查询结果被复数化
回复

使用道具 举报

高级模式
您需要登录后才可以回帖 登录 | 免费注册

  • 官方微信

    欢迎关注永洪服务号!收费为0,价值无限

    扫码关注
  • 新浪微博

    让每位用户轻松挖掘数据价值!

    访问新浪微博
  • 智能客服
100W

用户等你来哦

Copyright   ©2012-2025  北京永洪商智科技有限公司  (京ICP备12050607) 京公网安备110110802011451号 |《永洪社区协议》
返回顶部