Skip to Content
0

SAP HANA Error: Column names not allowed

Oct 25, 2016 at 11:39 AM

285

avatar image
Former Member

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?

SQL
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
avatar image
Former Member Oct 25, 2016 at 01:39 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Phani KV Oct 25, 2016 at 01:27 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
James Zhang
Oct 26, 2016 at 01:46 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded