SAP HANA SQL中的18个表的UNION

2020-09-09 18:13发布

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


你好大师,

能否请您指导我优化以下SQL查询? 感谢您的帮助。

untitled.jpg

以TABLE_NAME的形式选择'TRANSACTION_RETRO',SUM(S.ROWS_PROCESSED)以ROWS_PROCESSED的形式选择(SELECT'TRANSACTION_PARTY_VALUES'以TABLE_NAME的形式,COUNT(*)以ROWS_PROCESSED的形式从" table_name"选择

WHERE EXTRACT_ID = TO_CHAR(20190) 从" table_name"中选择" TRANSACTION_PARTICIPANT"作为TABLE_NAME,以ROWS_PROCESSED的身份
在其中EXTRACT_ID = TO_CHAR(20190409111959-1)UNION中,从" TABLE"中选择" CUSTOMER_TRANSACTION"作为TABLE_NAME,以COUNT(*)AS ROWS_PROCESSED WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择'WITHDRAWAL_CHECK'作为TABLE_NAME,COUNT(*)作为ROWS_PROCESSED从" table_name"中获取
WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择" PAYMENT_COUNT_TABLE(*) )AS从" table_name"中获取ROWS_PROCESSED
在哪里EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择'OTHER_LOAN_TRANSACTION'作为TABLE_NAME,COUNT(*)从" table_name"中获取ROWS_PROCESSED来自
WHERE EXTRACT_ID = TO_CHAR(190409) 选择" MATCHED_PUSH_TRANSACTION"作为 TABLE_NAME,从" table_name"开始以ROWS_PROCESSED身份访问
WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择TABLE_NAME作为" GENERIC_LOAN_TRANSACTION",而COUNT(*)从" table_name"以ROWS_PROCESSED作为
ID, 20190409111959-1)UNION SELECT'FEE_CALCULATION'作为TABLE_NAME,COUNT(*)作为ROWS_PROCESSED从" table_name"
WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择'CARD_TRANSACTION'作为TABLE_NAME,COUNT(*)作为ROWS_PROC table_name"
WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择'BANK_TRANSACTION'作为TABLE_NAME,COUNT(*)作为ROWS_PROCESSED从" table_name"中选择
WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择'CREDIT_TRANSACTION TABLE_NAME,在" EXTERT_ID = TO_CHAR(20190409111959-1)"中从" table_name"中以ROWS_PROCESSED形式进行选择,UNION选择" BANK_TRANSACTION_ROUTING"作为TABLE_NAME,在" 190"中以" ROWS_PROCESSED"从" 190_SELECT"中选择" BANK_TRANSACTION_ROUTING"作为选择(190) CORRECTIVE_ACTION'作为TABLE_NAME,COUNT(*) 在"表名称"中以ROWS_PROCESSED作为
在其中EXTRACT_ID = TO_CHAR(20190409111959-1)UNION中选择" CURRENCY_CONVERSION"作为TABLE_NAME,以COUNT(*)在"表"中以ROWS_PROCESSED从""中以EXTRACT_ID = TO_CHAR(20190_111959'Y)作为UNION SELECT TABLE_NAME,从" table_name"开始以ROWS_PROCESSED作为
WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择" SETTLEMENT_COMMUNICATION"作为TABLE_NAME,COUNT(*)以从" table_name"以ROWS_PROCESSED作为
WHERE_TRACKID 20190409111959-1)UNION SELECT'TRANSACTION_EVENT'作为TABLE_NAME,从(table_name)中以ROWS_PROCESSED的形式计数COUNT(*) untitled.jpg (161.3 kB)

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


你好大师,

能否请您指导我优化以下SQL查询? 感谢您的帮助。

untitled.jpg

以TABLE_NAME的形式选择'TRANSACTION_RETRO',SUM(S.ROWS_PROCESSED)以ROWS_PROCESSED的形式选择(SELECT'TRANSACTION_PARTY_VALUES'以TABLE_NAME的形式,COUNT(*)以ROWS_PROCESSED的形式从" table_name"选择

WHERE EXTRACT_ID = TO_CHAR(20190) 从" table_name"中选择" TRANSACTION_PARTICIPANT"作为TABLE_NAME,以ROWS_PROCESSED的身份
在其中EXTRACT_ID = TO_CHAR(20190409111959-1)UNION中,从" TABLE"中选择" CUSTOMER_TRANSACTION"作为TABLE_NAME,以COUNT(*)AS ROWS_PROCESSED WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择'WITHDRAWAL_CHECK'作为TABLE_NAME,COUNT(*)作为ROWS_PROCESSED从" table_name"中获取
WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择" PAYMENT_COUNT_TABLE(*) )AS从" table_name"中获取ROWS_PROCESSED
在哪里EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择'OTHER_LOAN_TRANSACTION'作为TABLE_NAME,COUNT(*)从" table_name"中获取ROWS_PROCESSED来自
WHERE EXTRACT_ID = TO_CHAR(190409) 选择" MATCHED_PUSH_TRANSACTION"作为 TABLE_NAME,从" table_name"开始以ROWS_PROCESSED身份访问
WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择TABLE_NAME作为" GENERIC_LOAN_TRANSACTION",而COUNT(*)从" table_name"以ROWS_PROCESSED作为
ID, 20190409111959-1)UNION SELECT'FEE_CALCULATION'作为TABLE_NAME,COUNT(*)作为ROWS_PROCESSED从" table_name"
WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择'CARD_TRANSACTION'作为TABLE_NAME,COUNT(*)作为ROWS_PROC table_name"
WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择'BANK_TRANSACTION'作为TABLE_NAME,COUNT(*)作为ROWS_PROCESSED从" table_name"中选择
WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择'CREDIT_TRANSACTION TABLE_NAME,在" EXTERT_ID = TO_CHAR(20190409111959-1)"中从" table_name"中以ROWS_PROCESSED形式进行选择,UNION选择" BANK_TRANSACTION_ROUTING"作为TABLE_NAME,在" 190"中以" ROWS_PROCESSED"从" 190_SELECT"中选择" BANK_TRANSACTION_ROUTING"作为选择(190) CORRECTIVE_ACTION'作为TABLE_NAME,COUNT(*) 在"表名称"中以ROWS_PROCESSED作为
在其中EXTRACT_ID = TO_CHAR(20190409111959-1)UNION中选择" CURRENCY_CONVERSION"作为TABLE_NAME,以COUNT(*)在"表"中以ROWS_PROCESSED从""中以EXTRACT_ID = TO_CHAR(20190_111959'Y)作为UNION SELECT TABLE_NAME,从" table_name"开始以ROWS_PROCESSED作为
WHERE EXTRACT_ID = TO_CHAR(20190409111959-1)UNION选择" SETTLEMENT_COMMUNICATION"作为TABLE_NAME,COUNT(*)以从" table_name"以ROWS_PROCESSED作为
WHERE_TRACKID 20190409111959-1)UNION SELECT'TRANSACTION_EVENT'作为TABLE_NAME,从(table_name)中以ROWS_PROCESSED的形式计数COUNT(*) untitled.jpg (161.3 kB)

付费偷看设置
发送
1条回答
昵称总是被占用
1楼-- · 2020-09-09 18:24

我删除了SQL Anywhere标记,因为这是另一种产品。

一周热门 更多>