Well, I am actually just modifying code that another had set up for me. The original was:
WHERE a.correlation_id IN (
SELECT b.correlation_id
FROM audit_service b
WHERE b.source_application = 'text'
AND b.class_name = 'text'
AND...
I now receive a new error which highlights my INTERVAL:
Error: ORA-00932: inconsistent datatypes: expected NUMBER got INTERVAL
I tried out putting INTERVAL before :num and taking it out of the case statement, but that only led to another error involving :num.
WHERE a.correlation_id IN (
SELECT b.correlation_id
FROM audit_service b
WHERE b.source_application = 'text'
AND b.class_name = 'text'
AND b.operation_name = 'text'
AND b.audit_timestamp between...
Getting closer! I now receive a new error:
ORA-00933: SQL command not properly ended
It points to my last statement in my WHERE (not in the code presented in this thread) which I know works correctly when I comment out the recent code added. So it is forcing an error. I figure it may be because...
Feels like it is really close now. But when I implemented the case into my code, I receive the error.
It highlights my first :num
Error: ORA-00905: missing keyword
AND b.audit_timestamp between to_date(:my_date,'MM-DD-YYYY') - case :period
when 1 then INTERVAL :num DAY
when 2 then INTERVAL...
Okay, now what about the number value that is '7' in my example. I need to change that as I change month to day. I'd also appreciate a short example of where the CASE would go in my code.
Thanks so much for the fast reply!
Hello all. Thanks in advance for the help. My problem seemed like a simple one, but has turned into a big head ache.
I am basically selecting data in a certain time period that I allow the user to specify with the use of parameters. Now, in order to select that data, I ask for the user to input...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.