Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

How to execute dynamic select into query in hana procedure

$
0
0

Hi,

 

   I have to execute a select query result into a variable, so the script is :

 

      go_table_name := upper(R.company_schema) || 'GENERIC_OBJECT_T' ;

      qry := 'select count(1) into "goparent_constraint_company" from ' || go_table_name ||  ' where parent_row_id not in (select row_id from ' ||                go_table_name || ')';   

     EXECUTE IMMEDIATE(:qry);

 

 

  But on calling the procedure , i get an error : [337] (range 3) INTO clause not allowed for this SELECT statement exception: INTO clause not allowed for this SELECT statement

 

  What is the correct way to write this query?

 

 

Thanks,

Sooraj


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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