on 04-09-2015 8:21 PM
Hallo,
I have a problem with SAP HANA SQL EXISTS Predicate. Can somebody help me?
The definition from “SAP HANA SQL and System Views Reference” is:
2.4.4 Exists Predicate
Syntax
<exists_predicate> ::= [NOT] EXISTS ( <subquery> )
Description
Returns true if the <subquery> returns a result set that is not empty and returns false if the <subquery> returns an empty result set.
----------------------------------
-- My test procedure
----------------------------------
CREATE PROCEDURE SP_TEST
AS
BEGIN
IF EXISTS (SELECT BUKRS FROM T001)
THEN
SELECT 'THEN …' FROM DUMMY;
ELSE
SELECT 'ELSE …' FROM DUMMY;
END IF;
END;
---------------------------
But I get an error message and the procedure cannot be compiled.
SAP DBTech JDBC: [7] (at 39): feature not supported: Subquery is not allowed
Can somebody help me? Where is my mistake?
Best regards,
Y. Hu
The EXISTS predicate as you want to use it can part of a SQL statement but cannot be used as a function within SQLScript.
- Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.