cancel
Showing results for 
Search instead for 
Did you mean: 

Stored procedure logic to update HANA custom table from calc view

Former Member
0 Kudos

Hi,

I need some help in creating stored procedure to update hana custom table. We need to persist output from calculation view.

PROCEDURE "_SYS_BIC"."TEST" ( )

       LANGUAGE SQLSCRIPT

       SQL SECURITY INVOKER

    --DEFAULT SCHEMA <default_schema_name>

       READS SQL DATA AS

BEGIN

DELETE FROM "Schema"."HANA_CUSTOM_TABLE";

INSERT INTO "Schema"."HANA_CUSTOM_TABLE";

and then some syntax for inserting from calc view below...


SELECT

Field1,

Field2,

Field3

FROM

  "_SYS_BIC"."HANA calc view";

END;


Thanks

Sonni

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

Hi Sonni,

please adhere to the and don't just drop your requirement here.

What is the specific problem you face? At what point are you stuck with your development?

There's plenty of information available in the developers guide, in SAP Academy videos on YouTube and here on SCN.

Make use of your favorite search engine!

- Lars

Former Member
0 Kudos

Hi Lars,

Not sure why I'm violating anything in rules of engagement with my question. My SQLscript skills suck and I need help structuring this stored procedure. I created a similar message earlier on asking similar question. There doesn't seem to be any helpful information out here about it. I think I have the answer now, but would encourage Patrick Bachmann to create the blog so people can start referencing it and using it.

I would also encourage you or anyone else to create a video explaining steps. I would happily use that going forward along with my favorite search engine...

Sonni

lbreddemann
Active Contributor
0 Kudos

The point here is that "spec dumping" like your post is not endorsed in SCN.

It's a community of professional users of SAP products with volunteers sharing their experiences.

The expectation here is that everyone works as far as possible on the problem first and asks specific questions on points where (s)he get stuck.

Sorry, if that doesn't meet your expectation. But that's what SCN is.

Commands like INSERT INTO (<subselect>) are in the product documentation and standard SQL. There's plenty of learning material on SQL available - so, from your post above, I don't see any additional difficulty than actually learning SQL - which is a baseline ability for any DB developer.

- Lars

Former Member
0 Kudos

Hi Lars,

As a user of SDN/SCN for almost ten years, I admit that I don't agree with your view of the situation. I got as far I could and asked the question. I would call that acceptable. Maybe I should have given the syntax error I was getting, but that would have been obvious. I'm sorry if you disagree with me.

Sonni

lbreddemann
Active Contributor
0 Kudos

Well the thing is, with asking unprepared questions without doing your part of the work first - that is: check the documentation, try to make it work, circle in on the roadblock - you make this whole community a lot less attractive to people who would otherwise be willing to help.

SCN is deliberately not a training center to provide 101 knowledge. That's what the documentation and teams like SAP HANA Academy are for.

Personally I'm not interested in wading through tons of unprepared questions that can be answered by reciting the documentation.

The fact that you or anyone else had been on SCN for a long time (and none of the two profiles I found seem to have been a actively sharing anything) doesn't really change that as this had always been that way.

So there you go.

Former Member
0 Kudos

Hi Lars,

I have had varied activity levels based on my employment on SDN/SCN - you must not have found my most active S-users Any way, let's stop debating and just agree to disagree.

Regarding my original question and issue, I managed to track down an SQL guy and we figured out the right syntax. I've shared the approach in , since there didn't seem to anything in SCN or anywhere else that addresses this.

I hope it can be of some help to others.

Sonni

Answers (0)