on 11-02-2012 6:57 PM
For a proof of concept, we are loading (and reloading!) data into table from local files. Data Services is NOT connect to our HANA box. To accelerate the process, it would be helpful to save the "DELETE FROM" or "TRUNCATE TABLE" into stored procedures. However, the stored procedures created under Content do not support INSERT/UPDATE/DELETE. Of course, I can always store the SQL as text files on my local PC, but it would be useful to store them centrally, where others could use them.
Any suggestions?
Hi John,
If you are creating the procedure from the Quick Launch option, it always creates procedures as read-only and hence INSERT/UPDATE/DELETE wouldn't be allowed. However you can create procedures in the sql editor without the Read-only option. For e.g.:
create procedure <proc_name>()
language sqlscript sql security definer
begin
delete from <table_name>;
end;
You are allowed to use "delete from" in procedures such as above. Truncate statement is allowed only with temporary tables within a procedure though.
Thanks,
Anooj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, it gets created under the schema of the user that the sql editor is connected to. Alternatively, you can create it under a schema of your choice in which case you need to name your procedure as <schema>.<proc_name> and your user should have "create any" access on that schema.
Once the procedure is created, you can give execute access to it under "sql privieleges"to any other user by:
a. Giving "execute" access to the whole schema
or
b. Giving "execute" access to just the procedure
Thanks,
Anooj
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.