Splunk Search

getting error like "java.sql.SQLException: Missing IN or OUT parameter at index:: 2". Can you please troubleshoot?

1240062
New Member

SELECT A.* FROM "STG_CONTACT"."CRMTRC_CONVERSION_EVENT" A where A.CRMTRC_TIMESTAMP> ? and A.CRMTRC_TIMESTAMP< ?+5 order by CRMTRC_TIMESTAMP

I am getting error while iam running data input. Any help can be appreciated.

Tags (1)
0 Karma

jplumsdaine22
Influencer

Sounds like the second ? is not getting filled. I'm not sure that splunk will use every instance of the ?, so you'll need to rewrite your query.

However, as you want to limit your results to the 5 results after your checkpoint value, you could use the max_rows parameter in the db_inputs.conf file instead. Just use max_rows = 6 and change your query to be

SELECT A.* FROM "STG_CONTACT"."CRMTRC_CONVERSION_EVENT" A where A.CRMTRC_TIMESTAMP> ? order by CRMTRC_TIMESTAMP
0 Karma

1240062
New Member

Thank you , but...here Check point is date that I have given. +5 means from that check point it adds 5 days to that date. So , how can I write? I need data between the two dates.

0 Karma

jplumsdaine22
Influencer

ah right. Is there a reason you want a window? Usually with an input you would want all the latest data from the table

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...