44
Views
9
Comments
Query - Error - illegal variable name/number
Question
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
Query.sql
2012-03-16 12-21-09
João Rosado
Staff
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
2023-08-28 07-00-10
Paulo Torres
Champion
Thanks João.

I will try =)

Regards
2016-04-21 20-09-55
J.
 
MVP
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)
2023-08-28 07-00-10
Paulo Torres
Champion
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
2012-03-16 12-21-09
João Rosado
Staff
Hi Paulo

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

Regards
João Rosado
2023-08-28 07-00-10
Paulo Torres
Champion
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 =)
Print.JPG
2016-04-21 20-09-55
J.
 
MVP
that is a function i presume.

Try using the full name with table etc.
2012-03-16 12-21-09
João Rosado
Staff
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
2023-08-28 07-00-10
Paulo Torres
Champion
Hello João,

Now, i understand you.
I'll see.

Thanks =)
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.