Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 5653

Creation of Read Write Procedures in HANA

$
0
0

Hello Experts,

I've a scenario wherein, I need to take data from one of the table and do some modification to couple of cols and then insert the resultset into another table.

I believe to achieve this, the Procedure has to be a read-write procedure.

 

First of all, where to write this kind of procedure. Is it within SCHEMA or within the package ?

I don't get any option to select read write procedure within the SCHEMA but I do get option of read write procedure within my package as an "access mode".

 

 

Anyways, I did wrote the procedure at both places but here is the issue:

a) Procedure in SCHEMA: Executed fine but Doesn't populate data in the target table.

Snippet:

CREATE Procedure <SCHEMA_NAME>.<PROC_NAME>

LANGUAGE SQLSCRIPT

AS

 

/**Local Variable declarations **/

v_fyear nvarchar(4);

v_period nvarchar(7);

 

BEGIN

  it_goals1 = Select * from <SCHEMA_NAME>.<SOURCE_TABLE>;

  it_goals2 = Select ........from :it_goals1;

   INSERT INTO <SCHEMA_NAME>.<TARGET_TABLE> SELECT * from it_goals2;

END;

 

b) Procedure in Package: I cant activate it as i get below compilation error.

Message :

          Repository: Internal error during statement execution, please see the database error traces for additional details;error executing statement; insufficient privilege: Not authorized at ptime/query/checker/query_check.cc:2137

 

Can you please help me here in resolving the issue ?

 

Thanks & regards,

Jomy


Viewing all articles
Browse latest Browse all 5653

Latest Images

Trending Articles



Latest Images

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