cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HANA Error: Column names not allowed

yuveer_popat
Explorer
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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..

Answers (2)

Answers (2)

JamesZ
Advisor
Advisor
0 Kudos

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

KodandaPani_KV
Active Contributor
0 Kudos

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..