ORA-01036: illegal variable name/number

OSR Database has thrown an exception

Source: Execute query

Message: ORA-01036: illegal variable name/number

Exception Type: OracleException

System.Data.OracleClient.OracleException (0x80131938): ORA-01036: illegal variable name/number

Server stack trace:
at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
at System.Data.OracleClient.OracleParameterBinding.Bind(OciStatementHandle statementHandle, NativeBuffer parameterBuffer, OracleConnection connection, Boolean& mustRelease, SafeHandle& handleToBind)
at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)
at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals)
at System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at UiPath.Database.DatabaseConnection.ExecuteQuery(String sql, Dictionary`2 parameters, Int32 commandTimeout, CommandType commandType)
at UiPath.Database.Activities.ExecuteQuery.<>c__DisplayClass38_0.b__0()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object args, Object server, Object& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]:
at UiPath.Database.Activities.ExecuteQuery.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

When I try to a call a Parameter within my SQL query, I’m getting this error “ORA-01036: illegal variable name/number”

This is my query -

“Select PON From (Select PON, order_number, order_version From CUPICSUP.ORDER_CONTENT_EXTRACT_MAIN Where ECCKT = ‘@IframeParameter’ Order By INSERTED_DATE DESC) Where ROWNUM = 1”

P:S - If I hard code the value in the place of Parameter. I’m able to get results

Someone please do help me with this issue. Your support is much appreciated.

Thanks in advance.

Raj
if this is a oracle SQL you are trying to fire then i have seen that instead of @ put :
Try with replacing the ECCKT = ‘@IframeParameter’ with ECCKT = :IframeParameter

I faced same issues replacing @ with : for parameter did not help. Instead I used assigned statement to build the string