Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8357

CONNECT BY PRIOR statement issue

$
0
0

Hi,

 

I'm using the below select query to build a relationship b/w ID & parent_id, but HANA studio is throwing a syntax error. I don't see a problem around the syntax. Please throw some light's here.

 

 

SELECT * FROM "SIVA_TEST"."Core_Competency" START with  "Competency_ID"=1

CONNECT BY PRIOR "Competency_ID" = "Parent_Competency_ID"   ;

 

Error:

 

Could not execute 'SELECT * FROM "SIVA_TEST"."Core_Competency" START WITH "Competency_ID"='1' CONNECT BY PRIOR ...' in 170 ms 563 µs .

SAP DBTech JDBC: [257] (at 46): sql syntax error: incorrect syntax near "START": line 2 col 1 (at pos 46)

 

 

Table struct:

 

create column table "SIVA_TEST"."Core_Competency"("Competency_ID" integer,

"Competency_Name" varchar(200),

"Competency_description" varchar(1000),

"Parent_Competency_ID" integer,

"start_date" date,

primary key("Competency_ID"));

 

Thanks,

Siva.


Viewing all articles
Browse latest Browse all 8357

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>