你好,我是 SAP HANA 的新手,我有这个 T-SQL 代码:
`if(@IsBes='E')begin
if((select top 1 U_bBesYontem from OHEM where empID=@EmpId)='O') begin
set @Bes=@Brut*(select top 1 U_bBesOran from OHEM where empID=@EmpId)/100
end
if((select top 1 U_bBesYontem from OHEM where empID=@EmpId)='T') begin
set @Bes=(select top 1 U_bBesTutar from OHEM where empID=@EmpId)
end
end`
我正在为 SAP HANA 尝试这段代码
IF (:IsBes = 'E') THEN
IF ((SELECT TOP 1 “U_bBesYontem"
FROM
OHEM
WHERE
"empID" = :EmpId) = 'O')
THEN
Bes := :Brut * (SELECT TOP 1 "U_bBesOran"
FROM OHEM
WHERE
"empID" = :EmpId) / 100;
END IF;
IF ((SELECT TOP 1 "U_bBesYontem"
FROM OHEM
WHERE "empID" = :EmpId) = 'T') THEN
SELECT (SELECT TOP 1 "U_bBesTutar"
FROM OHEM
WHERE "empID" = :EmpId) INTO Bes
FROM DUMMY;
END IF;
END IF;
并尝试了很多代码变体,但我总是最终得到这个错误:
SAP DBTech JDBC: [7]: feature not supported:
Sub-query is not supported in a nested procedure call:
line 47 col 28 (at pos 2273)
我很困惑,所以有人可以提供任何建议吗?