Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
dvorakstephen11
Contributor III
Contributor III

Non-numeric character in datetime or interval

I'm getting this error when I run my job: 
Exception in component tInformixInput_1
java.sql.SQLException: Non-numeric character in datetime or interval.
I'm sure it's related to the portion of my WHERE clause that references my global variables. Am I missing a tick mark or a parenthesis or something? It seems right.
AND  (ccdr.startdatetime - INTERVAL(6) HOUR to HOUR) BETWEEN '" + ((String)globalMap.get("CurrentDate")) + " " + ((String)globalMap.get("PreviousHour")) + ":" + ((String)globalMap.get("MinuteInterval")) + ":00' AND '" + ((String)globalMap.get("CurrentDate")) + " " + ((String)globalMap.get("CurrentHour")) + ":" + ((String)globalMap.get("MinuteInterval")) + ":00' 

Here are my global variables:

0683p000009MB3J.png
Labels (3)
3 Replies
Anonymous
Not applicable

try to remove the single quote around the datetime.
AND  (ccdr.startdatetime - INTERVAL(6) HOUR to HOUR) BETWEEN " + ((String)globalMap.get("CurrentDate")) + " " + ((String)globalMap.get("PreviousHour")) + ":" + ((String)globalMap.get("MinuteInterval")) + ":00' AND "
dvorakstephen11
Contributor III
Contributor III
Author

I took the first single quote off and received a syntax error. I took away the corresponding single quote and received a syntax error. I removed all the single quotes and received a syntax error. I replaced all the single quotes and the job ran successfully...
I hadn't changed anything since I posted this problem, but somehow the job works now. Bug in the system?
Thanks for your help!
Anonymous
Not applicable

I think there must be a wrong syntax in your previous query, not a bug of component, because it is runtime error thrown by database, if the job has a compilation error, the job can not be run.