Skip to main content
October 7, 2014
Answered

ORA-00900: invalid SQL statement (ColdFusion/Java)

  • October 7, 2014
  • 2 replies
  • 1303 views

I found a bunch of topics on this subject, but none seem to exactly be doing what is going on for me.

I have a ColdFusion/Java routine that displays funding requests that need to be approved. When you click on the action button, you can either approve or disapprove. When the user presses the button, I get the error message via e-mail with a copy of the trace. It shows me the statement that isn't valid. I copy it and run it in SQL*Plus on my Production database. It returns the row expected. How can that be? Confused.

Here is the trace [link]https://dl.dropboxusercontent.com/u/3594970/1244Err.txt

Oracle 11g on a Windows server

This topic has been closed for replies.
Correct answer

Removed the extra characters (PM User in my code example) and the error went away.

2 replies

Correct answer
October 8, 2014

Removed the extra characters (PM User in my code example) and the error went away.

BKBK
Community Expert
Community Expert
October 7, 2014

The cause is self evident, and the stack trace repeats it more than a dozen times: invalid SQL statement.

October 7, 2014

Understood... I copied the statement and ran in SQL*Plus and it returned the proper results.  How can that be an invalid statement?   It ran successfully prior to last week and now, after solving the getBuiltInScopes() issue, this was hiding behind it.   Adding my e-mail address in Application.cfc got me this stack trace, which wasn't happening prior. 

October 7, 2014

Could you show us the code? The SQL statement is of course different from the Coldfusion query code.


<cfquery name="getapprovaldetails" datasource="#datasource#">PM User

SELECT * FROM auth_fundreqdoc WHERE docid = #url.docid#

</cfquery>

In the stack trace, it shows the proper docid.  The Pm User up there is a person's name.  I removed it here and changed it to xxxxx in the stack trace.