HANA左外连接语法

时间:2017-06-06 14:15:08

标签: sql hana hana-sql-script

我正在尝试使用左外连接在HANA中构建查询。我在where子句中使用(+)符号。我经常在Oracle中这样做;但在HANA中,它返回语法错误。 HANA是否支持此语法?

select * 
FROM
   "_SYS_BIC"."FinancialReporting.ReportingViews.Tech_Analytics/CV_LOA_FINANCIAL_DETAIL_GRA" F1,
   "_SYS_BIC"."FinancialReporting.MasterData/CV_D_ACCOUNT_GRA" F2,
   "_SYS_BIC"."FinancialReporting.MasterData/CV_D_COMPANY_GRA" F3,
   "_SYS_BIC"."FinancialReporting.MasterData/CV_D_COSTCENTER_GRA" F4,
   "_SYS_BIC"."FinancialReporting.ReportingViews/CV_LOA_MEASURES_LEVELS_TA_GRA" F5,
   "_SYS_BIC"."FinancialReporting.MasterData/CV_D_VENDOR_GRA" F6
WHERE
   (F1."acct_nmbr" = F2."acct_nmbr")
   AND (F1."company_cd" = F3."company_cd")
   AND (F1."cost_center_cd" = F4."cost_center_cd")
   AND (F1."acct_nmbr" = F5."acct_nmbr")
   AND F1."vendor_cd" = F6."vendor_cd"(+)
   AND (F1."acctg_dt" >= '2016-01-01'
   AND F1."acctg_dt" <= '2016-02-01'))

1 个答案:

答案 0 :(得分:4)

您需要学习使用标准final String note = "Serum Cholesterol 154 150 250 mgs/dl\n-\nSerum Triglycerides 67 90 200 mgs /dl\n-\nSerum HDL: Cholesterol 38 35 55 mgs /dl\n-\nSerum LDL: Cholesterol 49 85 150 mgs/d1\n-\nSerum VLDL: Cholesterol 13 10 40 mgs/dl\n-\nTotal Cholesterol / HDL Ratio: 3.90\"; final JCas jcas = JCasFactory.createJCas(); jcas.setDocumentText(note); final AnalysisEngineDescription aed = getFastPipeline(); SimplePipeline.runPipeline(jcas, aed); CAS cas = jcas.getCas(); JsonCasSerializer jcs = new JsonCasSerializer(); jcs.setPrettyPrint(true); // do some configuration StringWriter sw = new StringWriter(); jcs.serialize(cas, sw); // serialize into sw System.out.println(sw.toString()); 语法:

JOIN