0

是否可以在设计工作室 1.2 中创建一个视图来列出 top-N 或 bottom-N 以供使用?

我已经弄清楚了创建存储过程所需的 SQLScript 以获得相同的内容,如下所示 -

BEGIN 
select 
"REGION",
"COUNTRY",
"CITY",
"Customer Name",
sum("Gross Sales"),
sum("Net Sales")
 from "USER1"."EXPO_SALES"
 GROUP BY "Customer Name",CITY,COUNTRY,REGION
 ORDER BY sum("Net Sales") Desc
 limit 10;
END;

如何将输出带入视图以使用 SAP Design Studio 1.2?

4

1 回答 1

1

只需创建一个视图:

CREATE VIEW "USER1"."EXPO_SALES_10" (
"REGION",
"COUNTRY",
"CITY", 
"Customer Name",
"SUMOFGROSSSALES",
"SUMOFNETSALES" ) 
AS SELECT 
"REGION",
"COUNTRY",
"CITY",
"Customer Name",
sum("Gross Sales"),
sum("Net Sales")
 from "USER1"."EXPO_SALES"
 GROUP BY "Customer Name",CITY,COUNTRY,REGION
 ORDER BY sum("Net Sales") Desc
 limit 10
WITH READ ONLY;
于 2014-08-09T16:01:29.860 回答