All Apps and Add-ons

Hi, can someone help me I need to execute the below stored procedure in Splunk

mlindokuhle
Loves-to-Learn

CREATE OR REPLACE PROCEDURE BSDTADLS.DMS_Main
(Query_type in varchar,
query_id in varchar,
outResults out sys_refcursor
)
as


BEGIN

IF upper(Query_type) = 'F'
THEN
open outResults for
select distinct A.J_BACI, A.J_BAGT, A.J_BAZC, A.J_BBS_,A.J_BAJ8,A. J_BAO8, B.J_MBTI , c.J_NOHT
from J_COM A
left join J_CLMS B ON A.J_BACI = B.J_MBXI
inner join J_CTUN c on A.J_crpi = c.J_NOGI and c.J_NOFC = '02'
WHERE A.J_BACI = query_id;

ELSIF upper(Query_type) = 'L'
END IF ;

END DMS_Main;
open outResults for SELECT distinct A.J_MBTI ,A.J_MEE_,A.J_MCFC,A.J_MCI8,A.J_MCJ8,B.J_Mvfi, B.J_MVGT
from J_CLMS A
Inner join J_CUPI B
ON A.J_MBWI = B.J_MVAI
WHERE A.J_MBTI = query_id;
ELSIF upper(Query_type) = 'A'

Labels (2)
0 Karma

saravanan90
Contributor

This may help..

https://docs.splunk.com/Documentation/DBX/3.0.2/DeployDBX/Commands#procedure

--------------------

An upvote would be appreciated if the above reply is useful to you.

 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Splunk can't do that.  SQL stored procedures only run on SQL databases.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...