on 10-25-2016 12:39 PM
Hi experts,
I am trying to build a stored procedure in content which contains the following statement:
CREATE TABLE "CCR"."STATUS_DUPLICATES"
AS
( SELECT
"OBJNR" ,
SUM("SUMMATION") AS TEST
FROM "
CCR"."P07_STATUS"
GROUP BY "OBJNR"
HAVING SUM("SUMMATION") > 1 );
I get the following error: sql syntax error: only column names allowed:
It appears that HANA does not like sum/max/min etc in the select statement when creating a table. Does anyone have a suggestion on how to over come this?
Hi ,
I tried its working.Please check if "CCR"."P07_STATUS" has any field called "SUMMATION".
If you need column table use syntax create column table..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yuveer,
I tested followings and it works on hana version 1.00.122:
create table t1 (i int, ii int);
create table t1 (i int, ii int);
create table t2 as (select i, sum(ii) as sumii from t1 group by i having sum(ii)>1);
can you share the definition of CCR"."P07_STATUS"?
Best regards,
James
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you are creating procedure yes
CREATE PROCEDURE "CCR"."STATUS_DUPLICATES"
AS
BEGIN
END;
above one is the general syntax for create procedure
Thanks,
Phani..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.