Query - Error - illegal variable name/number

Query - Error - illegal variable name/number

  
Hello everyone!


Sorry for my question... I have a problem in advanced Query. In sql managment and Oracle SQL Developer run OK.

But in plataform not run and i gives me a error: ORA-01036 - illegal variable name/number.
Someone can help me?
Query in attach.

Thanks.

Best Regards
Hi Paulo,

The query itself looks ok, maybe you should try to test smaller parts of it on test query to isolate the problem.

ORA-01036 is a very generic error. I lost some hours trying to find a problem like that.

On my notes I have this:
"ORA-01036 : invalid host/bind variable name

First check that the variable names are not reserved names, contain invalid characters or start with invalid characters ("_" is an invalid starter)."

Also I had that problem once when I had an alias of a table called "a" ..oracle can be very picky.
You can try to remove the comments and the accents (like the "í" in "País de contrapartida") and see if it helps


Regards
João Rosado
Thanks João.

I will try =)

Regards
Long query  :)

1. try to execute parts of it in advanced query.

2. remove the comments, It may or may not have effect on the resulted query (I have no idea how Outsystems strips comments or removes newlines etc)
Hello,

This query is a part of original query, the original have more than 1000 lines :)

I removed the comments and now, give me the error: ORA-00904 'ARRED_VL_MONETARIO' Invalid Identifier
I think that when passed table for Outsystems was collumns who stayed with another name.
What you think?

Best Regards,
Paulo Torres
Hi Paulo

Does the runtime user of the platform have permissions to use that arred_vl_monetario function?

Regards
João Rosado
Hello João,

My user was not permissions in database connections but now i put full control and the error continue.
What you think?

My permissions print in attach.

Thanks =)
that is a function i presume.

Try using the full name with table etc.
Hi Paulo

I was talking about the database runtime user, not the user in Service Center.

arred_vl_monetario should be a function defined somewhere in the database, and the database user that runs the query needs to have permissions to execute it.

Regards,
João Rosado
Hello João,

Now, i understand you.
I'll see.

Thanks =)