SALESORDERINCOME.QVW
//销售订单
SALESORDER_BASE_TMP:
NoConcatenate
LOAD T_SAL_ORDER.LE_ID,
[T_SAL_ORDER.LCY CODE],
T_SAL_ORDER.SYSTEM,
T_SAL_ORDER.#DataDateTime,
T_SAL_ORDER.#DataDate,
T_SAL_ORDER.FID AS FID,
T_SAL_ORDER.FBILLNO AS SALES_INCOMING.process_id,
T_SAL_ORDER.FCUSTID AS FCUSTID,
date(num#(T_SAL_ORDER.FCREATEDATE, '#.##0,0', ',', '.')) AS SALES_INCOMING.date, //美国格式
date(num#(T_SAL_ORDER.FAPPROVEDATE,'#.##0,0', ',', '.')) AS SALES_INCOMING.DateFirstOrderConfirmation,
T_SAL_ORDER.FSALERID AS FSALERID
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_ORDER.qvd]
(qvd);
Inner JOIN
LOAD T_SAL_ORDERENTRY.LE_ID,
[T_SAL_ORDERENTRY.LCY CODE],
T_SAL_ORDERENTRY.SYSTEM,
T_SAL_ORDERENTRY.#DataDateTime,
T_SAL_ORDERENTRY.#DataDate,
T_SAL_ORDERENTRY.FMATERIALID AS FMATERIALID,
T_SAL_ORDERENTRY.FID AS FID,
T_SAL_ORDERENTRY.FENTRYID AS FENTRYID,
T_SAL_ORDERENTRY.FSEQ AS SALES_INCOMING.process_pos_nr,
T_SAL_ORDERENTRY.FQTY AS SALES_INCOMING.qty,
num#(T_SAL_ORDERENTRY.FZQTAXAMOUNT, '####,##', ',', '.') AS FZQTAXAMOUNT
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_ORDERENTRY.qvd]
(qvd);
inner join
LOAD T_SAL_ORDERENTRY_F.LE_ID,
[T_SAL_ORDERENTRY_F.LCY CODE],
T_SAL_ORDERENTRY_F.SYSTEM,
T_SAL_ORDERENTRY_F.#DataDateTime,
T_SAL_ORDERENTRY_F.#DataDate,
T_SAL_ORDERENTRY_F.FID AS FID,
T_SAL_ORDERENTRY_F.FENTRYID AS FENTRYID,
T_SAL_ORDERENTRY_F.FAMOUNT AS SALES_INCOMING.Original.Amount_1,
T_SAL_ORDERENTRY_F.FAMOUNT_LC AS SALES_INCOMING.amount_1,
T_SAL_ORDERENTRY_F.FALLAMOUNT,
T_SAL_ORDERENTRY_F.FALLAMOUNT_LC
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_ORDERENTRY_F.qvd]
(qvd);
//销售订单
SALESORDER_TMP:
load
SALES_INCOMING.process_id,
FMATERIALID,
FCUSTID,
FSALERID,
FID,
sum( num#(SALES_INCOMING.Original.Amount_1, '####,##', ',', '.')) AS SALES_INCOMING.Original.Amount,
SUM(num#(SALES_INCOMING.amount_1, '####,##', ',', '.')) AS SALES_INCOMING.amount
RESIDENT SALESORDER_BASE_TMP
Group By
SALES_INCOMING.process_id,
FMATERIALID,
FCUSTID,
FSALERID,
FID;
Inner JOIN
LOAD T_BD_CUSTOMER.LE_ID,
[T_BD_CUSTOMER.LCY CODE],
T_BD_CUSTOMER.SYSTEM,
T_BD_CUSTOMER.#DataDateTime,
T_BD_CUSTOMER.#DataDate,
T_BD_CUSTOMER.FCUSTID AS FCUSTID,
T_BD_CUSTOMER.FPROVINCIAL AS FPROVINCIAL,
T_BD_CUSTOMER.FNUMBER AS SALES_INCOMING.customer.id
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_BD_CUSTOMER.qvd]
(qvd);
Inner Join
LOAD T_BAS_ASSISTANTDATAENTRY.LE_ID,
[T_BAS_ASSISTANTDATAENTRY.LCY CODE],
T_BAS_ASSISTANTDATAENTRY.SYSTEM,
T_BAS_ASSISTANTDATAENTRY.#DataDateTime,
T_BAS_ASSISTANTDATAENTRY.#DataDate,
T_BAS_ASSISTANTDATAENTRY.FENTRYID AS FPROVINCIAL,
T_BAS_ASSISTANTDATAENTRY.F_LHLRZX AS F_LHLRZX
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_BAS_ASSISTANTDATAENTRY.qvd]
(qvd);
Inner Join
LOAD PBNQ_t_Cust100019.LE_ID,
[PBNQ_t_Cust100019.LCY CODE],
PBNQ_t_Cust100019.SYSTEM,
PBNQ_t_Cust100019.#DataDateTime,
PBNQ_t_Cust100019.#DataDate,
PBNQ_t_Cust100019.FID AS F_LHLRZX,
PBNQ_t_Cust100019.FNUMBER AS SALES_INCOMING.PC
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\PBNQ_t_Cust100019.qvd]
(qvd);
Inner JOIN
LOAD T_BD_OPERATORENTRY.LE_ID,
[T_BD_OPERATORENTRY.LCY CODE],
T_BD_OPERATORENTRY.SYSTEM,
T_BD_OPERATORENTRY.#DataDateTime,
T_BD_OPERATORENTRY.#DataDate,
T_BD_OPERATORENTRY.FENTRYID AS FSALERID,
T_BD_OPERATORENTRY.FSTAFFID AS SALES_INCOMING.sales.representative.Code
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_BD_OPERATORENTRY.qvd]
(qvd);
Inner JOIN
LOAD T_BD_STAFF_L.LE_ID,
[T_BD_STAFF_L.LCY CODE],
T_BD_STAFF_L.SYSTEM,
T_BD_STAFF_L.#DataDateTime,
T_BD_STAFF_L.#DataDate,
T_BD_STAFF_L.FSTAFFID AS SALES_INCOMING.sales.representative.Code,
T_BD_STAFF_L.FNAME AS SALES_INCOMING.sales.representative_id
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_BD_STAFF_L.qvd]
(qvd);
inner JOIN
LOAD T_BD_MATERIAL.LE_ID,
[T_BD_MATERIAL.LCY CODE],
T_BD_MATERIAL.SYSTEM,
T_BD_MATERIAL.#DataDateTime,
T_BD_MATERIAL.#DataDate,
T_BD_MATERIAL.FMATERIALID AS FMATERIALID,
T_BD_MATERIAL.FNUMBER AS SALES_INCOMING.article.id
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_BD_MATERIAL.qvd]
(qvd);
inner JOIN
LOAD T_SAL_ORDERFIN.LE_ID,
[T_SAL_ORDERFIN.LCY CODE],
T_SAL_ORDERFIN.SYSTEM,
T_SAL_ORDERFIN.#DataDateTime,
T_SAL_ORDERFIN.#DataDate,
T_SAL_ORDERFIN.FID AS FID,
T_SAL_ORDERFIN.FSETTLECURRID AS FCURRENCYID,
T_SAL_ORDERFIN.FExchangeRate AS FExchangeRate,
T_SAL_ORDERFIN.FBILLALLAMOUNT ,
T_SAL_ORDERFIN.FBILLALLAMOUNT_LC
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_ORDERFIN.qvd]
(qvd);
inner Join
LOAD T_BD_CURRENCY.LE_ID,
[T_BD_CURRENCY.LCY CODE],
T_BD_CURRENCY.SYSTEM,
T_BD_CURRENCY.#DataDateTime,
T_BD_CURRENCY.#DataDate,
T_BD_CURRENCY.FCURRENCYID AS FCURRENCYID,
T_BD_CURRENCY.FNUMBER AS SALES_INCOMING.currency,
T_BD_CURRENCY.FCODE AS SALES_INCOMING.Original.Currency.Code
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_BD_CURRENCY.qvd]
(qvd);
//销售出库单
OUTSTOCK_TMP:
NoConcatenate
LOAD T_SAL_OUTSTOCK.LE_ID,
[T_SAL_OUTSTOCK.LCY CODE],
T_SAL_OUTSTOCK.SYSTEM,
T_SAL_OUTSTOCK.#DataDateTime,
T_SAL_OUTSTOCK.#DataDate,
T_SAL_OUTSTOCK.FID AS FOUTSTOCKID,
T_SAL_OUTSTOCK.FBILLNO,
T_SAL_OUTSTOCK.FDOCUMENTSTATUS
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_OUTSTOCK.qvd]
(qvd);
Inner Join
LOAD T_SAL_OUTSTOCKENTRY.LE_ID,
[T_SAL_OUTSTOCKENTRY.LCY CODE],
T_SAL_OUTSTOCKENTRY.SYSTEM,
T_SAL_OUTSTOCKENTRY.#DataDateTime,
T_SAL_OUTSTOCKENTRY.#DataDate,
T_SAL_OUTSTOCKENTRY.FID AS FOUTSTOCKID,
T_SAL_OUTSTOCKENTRY.FENTRYID AS FSTOCKENTRYID,
T_SAL_OUTSTOCKENTRY.FMATERIALID AS FMATERIALID
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_OUTSTOCKENTRY.qvd]
(qvd);
Inner Join
LOAD T_SAL_OUTSTOCKENTRY_F.LE_ID,
[T_SAL_OUTSTOCKENTRY_F.LCY CODE],
T_SAL_OUTSTOCKENTRY_F.SYSTEM,
T_SAL_OUTSTOCKENTRY_F.#DataDateTime,
T_SAL_OUTSTOCKENTRY_F.#DataDate,
T_SAL_OUTSTOCKENTRY_F.FENTRYID AS FSTOCKENTRYID,
T_SAL_OUTSTOCKENTRY_F.FCOSTPRICE AS FCOSTPRICE,
T_SAL_OUTSTOCKENTRY_F.FCOSTAMOUNT AS FCOSTAMOUNT
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_OUTSTOCKENTRY_F.qvd]
(qvd);
Inner Join
LOAD T_SAL_OUTSTOCKENTRY_R.LE_ID,
[T_SAL_OUTSTOCKENTRY_R.LCY CODE],
T_SAL_OUTSTOCKENTRY_R.SYSTEM,
T_SAL_OUTSTOCKENTRY_R.#DataDateTime,
T_SAL_OUTSTOCKENTRY_R.#DataDate,
T_SAL_OUTSTOCKENTRY_R.FENTRYID AS FSTOCKENTRYID,
T_SAL_OUTSTOCKENTRY_R.FSOORDERNO AS SALES_INCOMING.process_id
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_OUTSTOCKENTRY_R.qvd]
(qvd);
//发票
INVOICE_TMP:
NoConcatenate
LOAD T_AR_RECEIVABLEENTRY_LK_CW.LE_ID,
[T_AR_RECEIVABLEENTRY_LK_CW.LCY CODE],
T_AR_RECEIVABLEENTRY_LK_CW.SYSTEM,
T_AR_RECEIVABLEENTRY_LK_CW.#DataDateTime,
T_AR_RECEIVABLEENTRY_LK_CW.#DataDate,
T_AR_RECEIVABLEENTRY_LK_CW.FSID AS FZGENTRYID,
T_AR_RECEIVABLEENTRY_LK_CW.FENTRYID AS FCWENTRYID
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_AR_RECEIVABLEENTRY_LK_CW.qvd]
(qvd);
Inner Join
//LOAD T_AR_RECEIVABLEENTRY_CW.LE_ID,
// [T_AR_RECEIVABLEENTRY_CW.LCY CODE],
// T_AR_RECEIVABLEENTRY_CW.SYSTEM,
// T_AR_RECEIVABLEENTRY_CW.#DataDateTime,
// T_AR_RECEIVABLEENTRY_CW.#DataDate,
// T_AR_RECEIVABLEENTRY_CW.FID AS FCWID,
// T_AR_RECEIVABLEENTRY_CW.FENTRYID AS FCWENTRYID,
// T_AR_RECEIVABLEENTRY_CW.FMATERIALID AS FMATERIALID,
// T_AR_RECEIVABLEENTRY_CW.FORDERNUMBER AS SALES_INCOMING.process_id,
// num#(T_AR_RECEIVABLEENTRY_CW.FALLAMOUNTFOR, '####,##', ',', '.') AS INVOICEFALLAMOUNT,
// //折扣金额
// num#(T_AR_RECEIVABLEENTRY_CW.FSPLITAMOUNT, '####,##', ',', '.') AS INVOICEFSPLITAMOUNT,
// num#(T_AR_RECEIVABLEENTRY_CW.FPRICEQTY, '####,##', ',', '.') AS FCWSL
//
//FROM
//[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_AR_RECEIVABLEENTRY_CW.qvd]
//(qvd);
LOAD T_AR_RECEIVABLEENTRY_CW.LE_ID,
[T_AR_RECEIVABLEENTRY_CW.LCY CODE],
T_AR_RECEIVABLEENTRY_CW.SYSTEM,
T_AR_RECEIVABLEENTRY_CW.#DataDateTime,
T_AR_RECEIVABLEENTRY_CW.#DataDate,
T_AR_RECEIVABLEENTRY_CW.FID AS FCWID,
T_AR_RECEIVABLEENTRY_CW.FENTRYID AS FCWENTRYID,
T_AR_RECEIVABLEENTRY_CW.FPRICEQTY,
T_AR_RECEIVABLEENTRY_CW.FALLAMOUNTFOR,
T_AR_RECEIVABLEENTRY_CW.FORDERNUMBER AS SALES_INCOMING.process_id,
T_AR_RECEIVABLEENTRY_CW.FMATERIALID AS FMATERIALID,
T_AR_RECEIVABLEENTRY_CW.FALLAMOUNT,
T_AR_RECEIVABLEENTRY_CW.FNOTAXAMOUNTFOR AS FNOTAXAMOUNTFOR,
T_AR_RECEIVABLEENTRY_CW.FSPLITAMOUNT AS INVOICEFSPLITAMOUNT
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_AR_RECEIVABLEENTRY_CW.qvd]
(qvd);
Inner Join
LOAD T_AR_RECEIVABLE_CW.LE_ID,
[T_AR_RECEIVABLE_CW.LCY CODE],
T_AR_RECEIVABLE_CW.SYSTEM,
T_AR_RECEIVABLE_CW.#DataDateTime,
T_AR_RECEIVABLE_CW.#DataDate,
T_AR_RECEIVABLE_CW.FID AS FCWID,
T_AR_RECEIVABLE_CW.FBILLNO AS FCWFBILLNO,
T_AR_RECEIVABLE_CW.FZKJE AS FZKJE
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_AR_RECEIVABLE_CW.qvd]
(qvd);
Inner Join
LOAD t_AR_receivableFIN.LE_ID,
[t_AR_receivableFIN.LCY CODE],
t_AR_receivableFIN.SYSTEM,
t_AR_receivableFIN.#DataDateTime,
t_AR_receivableFIN.#DataDate,
t_AR_receivableFIN.FID AS FCWID,
t_AR_receivableFIN.FENTRYID,
num#(t_AR_receivableFIN.FEXCHANGERATE, '####,##', ',', '.') AS FCWEXCHANGERATE
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\t_AR_receivableFIN.qvd]
(qvd);
//发票进行单号,物料分组
INVOICE_GET_TMP:
NoConcatenate
load
SALES_INCOMING.process_id,
FMATERIALID,
sum( num#(FNOTAXAMOUNTFOR, '####,##', ',', '.')) AS INVOICENOTTAXEDAMOUNT_1,
sum( num#(INVOICEFSPLITAMOUNT, '####,##', ',', '.')) AS INVOICEFSPLITAMOUNT_1
RESIDENT INVOICE_TMP
Group By SALES_INCOMING.process_id,
FMATERIALID;
//计算出库单成本
OUTSTOCK_CALCULATION_TMP:
NoConcatenate
load
SALES_INCOMING.process_id,
FMATERIALID,
sum(num#(FCOSTAMOUNT, '####,##', ',', '.')) AS SUMCOSTAMOUNT
RESIDENT OUTSTOCK_TMP
Group By SALES_INCOMING.process_id,
FMATERIALID
;
//汇总输出发票金额 产品成本
PROFIT_GET_TMP:
NoConcatenate
load SALES_INCOMING.process_id,
FMATERIALID,
max(INVOICENOTTAXEDAMOUNT_1) AS SUMINVOICENOTTAXEDAMOUNT,
max(INVOICEFSPLITAMOUNT_1) AS SALES_INCOMING.Original_amount_reduction
RESIDENT INVOICE_GET_TMP
Group By SALES_INCOMING.process_id,
FMATERIALID;
Left Join
load SALES_INCOMING.process_id,
FMATERIALID,
MAX(SUMCOSTAMOUNT) AS SUMPRODUCTCOST
RESIDENT OUTSTOCK_CALCULATION_TMP
Group By SALES_INCOMING.process_id,
FMATERIALID;
//计算利润
PROFIT_CALCULATION_TMP:
NoConcatenate
load SALES_INCOMING.process_id,
FMATERIALID,
max(SUMINVOICENOTTAXEDAMOUNT - SUMPRODUCTCOST) AS SALES_INCOMING.profit
RESIDENT PROFIT_GET_TMP
Group by SALES_INCOMING.process_id,FMATERIALID;
SALESORDERINCOME.QVW的更多相关文章
- QVW中实现日期区间的选择功能!
QV在日期的选择上不是很灵活,日期区段的选择可以在列表框中直接用鼠标拖拉区段,如果跨周期比较长了还是不是很方便啦. 下面介绍的方式是完全实现了起始日期的选择功能. 注:日期这个字段在抽取的时候一定要格 ...
- Android入门(一)
原文链接:http://www.orlion.ga/387/ 一.安卓的系统架构 1. linux内核层,这一层为安卓设备提供底层的驱动 系统运行库层,这一层通过一些C/C++库来为Android系统 ...
- Python之路【第二十篇】Tornado框架
Tornado Tornado是使用Python编写的一个强大的.可扩展的Web服务器.它在处理严峻的网络流量时表现得足够强健,但却在创建和编写时有着足够的轻量级,并能够被用在大量的应用和工具中. 我 ...
- step by step install Caffe
Caffe + Ubuntu 14.04 + CUDA 8 + cudnn 8.0+Ananconda3+opencv3.0.0 //由于本人使用的是英文版ubuntu,没装汉语输入法,暂时就用蹩脚的 ...
- QlikView 权限设置问题和注意
企业级报表通常都涉及到复杂的权限问题, 比如文本级权限和行级权限,某区域经理只能看到该区域的销售数据.QlikView自然也提供了该种功能. 具体方法: 在Edit script中新建一个tab, 输 ...
- Ubuntu环境搭建系列—WPS/LAMP/Python篇
由于篇幅不宜太长,所以就将此文分成了两部分,在第一部分中我们讲解了google-chrome(谷歌浏览器)的安装,jdk的环境配置,android开发的环境搭建.那么在第二部分中,位们将讲解的是金山W ...
- 说说设计模式~观察者模式(Observer)
返回目录 观察者模式,也叫发布/订阅模式(publish/subscribe),监视器模式等.在此种模式中,一个目标物件管理所有相依于它的观察者物件,并且在它本身的状态改变时主动发出通知.这通常透过呼 ...
- rfc2616 HTTP Protocl Analysis
catalog . Introduction . Protocol Parameters . HTTP Message . Request . Response . HTTP Method.Conte ...
- WAF(Web Appliction Firewall) Bypass Technology Research
catalog . What is Firewall . Detecting the WAF . Different Types of Encoding Bypass . Bypass本质 1. Wh ...
随机推荐
- CGridCtrl显示图片
- python scipy库
三.假定正态分布,求解1倍标准差和0.5倍标准差的概率? 二.求解多元线性或非线性方程组解 一.求解3元一次方程 1.学习资料 https://github.com/lijin-THU/notes- ...
- pytorch文档学习笔记(2)
三.CUDA semantics 二.Broadcasting semantics 广播机制 广播机制要第一项对齐,第一项对齐后(相等)才能广播,或者某个第一项为1. 但如果两个size个数相等,则 ...
- JS - 解决引入 js 文件无效的问题
增加 type 即可 <script type="text/javascript" src="....js"></script>
- 《打造扛得住的MySQL数据库架构》第7章 SQL查询优化
SQL查询优化 7-1 获取有性能问题SQL的三种方法 如何设计最优的数据库表结构 如何建立最好的索引 如何拓展数据库的查询 查询优化,索引优化,库表结构优化 如何获取有性能问题的SQL 1.通过测试 ...
- 2020/2/2 PHP代码审计之反序列化
0x00 序列化与反序列化 序列化: serialize()把对象转换为字节序列的过程称为对象的序列化 反序列化: unserialize()把字节序列恢复为对象的过程称为对象的反序列化 0x01 序 ...
- openstack trove主要贡献公司-Tesora被Stratoscale收购
新闻链接:http://www.stratoscale.com/press/press-releases/stratoscale-acquires-database-as-a-service-prov ...
- tomcat8.5的安装、卸载、配置和部署
安装和卸载 下载 http://tomcat.apache.org/ 环境变量 1.点击此电脑 右键—>属性. 2.创建变量名为CATALINA_HOME,的值为所解压安装tomcat的本地目录 ...
- Springboot整合mongodb时无法连接数据库
由于之前没有接触过mongodb,最近在学习时遇到了一些问题.用yml配置mongodb如下: spring: application: name:xc-service-manage-cms data ...
- 题解 P6098 【[USACO19FEB]Cow Land G】
震惊,蒟蒻学树剖第二天就打题解 所以说,理解之后树剖这种东西其实难度真心不大.至少这种模板题都可以秒切的 这里推荐一个博客: 树剖详解 蒟蒻就是在这个博客上学到的 如果想看我自己写的总结,请点 我的博 ...