我正在尝试将以下sas代码转换为HANA SQL。
create table age_r as
select A.*, B.Min_HOURS as EXCLUDE_HOURS
from Address A
inner join scope B
on A.Org_unit=B.Org_unit
where (A.Open_CASES='' or r.MAX_HOURS='')
quit;
你能告诉我什么是正确的HANA SQL吗?
答案 0 :(得分:0)
谢谢, 我几乎想通了。除了在一个地方,代码运行正常。但似乎a。*正在制造问题。如果我给出一个特定的列名称 a.case_id,查询运行正常。但是当我给。*时,我得到以下错误,
ERROR:
Could not execute 'create table ageing_1 as (select l.* from "BAN515"."ageing" as l inner join "BAN515"."VA_scope" as ...'
SAP DBTech JDBC: [383]: invalid identifier: B: line 7 col 8 (at pos 321)
ALMOST CORRECT QUERY:
create table ageing_1 as
(select A.* from "XYZ"."ageing" as A
inner join "XYZ"."VA_scope" as B
on A."org_unit" = B."org_unit"
where (A."open_cases"=' ' or B."Open Job"=' '));
答案 1 :(得分:0)
@Tanay,我通过替换表创建了相同的代码,并且执行时没有任何错误
create table myorderitems as (
select
B.*
from "SCHEMANAME"."VBAK" as A
inner join "SCHEMANAME"."VBAP" as B
on A."VBELN" = B."VBELN"
where A."VBELN" = '0000000001'
);
select * from myorderitems;
但是您的错误似乎指向不同的行号,是否可能? 你的问题还没有发布其他代码吗?