Splunk Search

DB connect Java sql SQL SYNTAXError Exception ORA-00933 command not properly ended

rakesh44
Communicator

I wan to count no of rows or columns injected in splunk from oracle database. Purpose of this is to compare data with splunk , to avoid any missing data while indexing.

| dbquery query="SELECT COUNT(*) FROM "table" connection"connection"

So am using below command

| dbquery query="SELECT COUNT(*) FROM To_chart(SYSDATE, 'DD-MM-YYY') ( july'-18, 'Sep-18')" connection="Test"

I have not given all query just given start and end of query. When I run with above command ending with error

Java sql SQL SYNTAXError Exception ORA-00933 command not properly ended

Tags (1)
0 Karma
1 Solution

rakesh44
Communicator

I am able to find out solution , below is the command

| dbquery query="SELECT COUNT(*) FROM (To_chart(SYSDATE, 'DD-MM-YYY') ( july'-18, 'Sep-18'))" connection="Test"

View solution in original post

0 Karma

rakesh44
Communicator

I am able to find out solution , below is the command

| dbquery query="SELECT COUNT(*) FROM (To_chart(SYSDATE, 'DD-MM-YYY') ( july'-18, 'Sep-18'))" connection="Test"

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...