Getting Data In

DB Connect SQL Procedures

Kyles
Observer

I've been using dbxquery connection=my_connection procedure=my_procedure to build reports and a few that my DBAs have built require time inputs, one I'm working on expects parameter '@StartDate',  Is there a way to pass that through to the stored proc?

Labels (1)
0 Karma

victor_menezes
Communicator

Hi @Kyles,

What version of DBConnect are you using?
The 3.* versions allow you to pass the field named params with values to be passed to the variables in the query/procedure:

dbxquery connection=<string> [fetchsize=<int>] [maxrows=<int>] [timeout=<int>] [shortnames=<bool>] query=<string> OR procedure=<string> [params=<string1,string2>]

Sample query:

dbxquery procedure="{call sakila.test_procedure(?, ?)}" connection="mysql" params="150,BOB"


 Please try that out if you are running DBConnect 3.x and let me know how it goes

0 Karma
Get Updates on the Splunk Community!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...