Skip to main content
Question

SQL Query Tool giving invalid identifier error


Forum|alt.badge.img+4

I have created a new IAL through IAL Object Developer which has alias names for columns. When I am trying to query the ial with column names, I have to write column names in “” to achieve the success through plsql developer but when I am trying to do same thing through SQL QUERY TOOL, I am getting ‘Invalid Identifier’ error as shown in screenshot. Please let us know what is wrong here.

 

4 replies

Forum|alt.badge.img+23
  • Superhero (Customer)
  • 1169 replies
  • August 14, 2024

Hi @Prateek903 

do get this error message also with the PL/SQL developer?


Forum|alt.badge.img+4
  • Author
  • Do Gooder
  • 4 replies
  • August 14, 2024

I was getting error in PLSQL as well but when I wrote column name as “Osasto” instead of Osasto, it resolved the issue in PLSQL developer. But same solution not working in SQL QUERY TOOL.


Forum|alt.badge.img
  • Do Gooder (Customer)
  • 2 replies
  • September 2, 2024

If you do select * from view then column Osasto shows with a heading of Osasto? I would expect this error in this scenario if you had a space in the column name but that is not showing here. Difficult to comment further with the info provided.


Forum|alt.badge.img+6

Hi @Prateek903 ,

Seems like you have used mixed case (Upper case and lower case together) while creating the alias names. If so you will have to wrap the identifiers in double quotes with the precise case you used while creating it (here you will have to mention as "Osasto"), whenever you refer to the object or its attributes. Otherwise the Oracle SQL will not identify such elements. 

The ideal way to name elements is to use only Upper case letters while creating them. If so you will no need to use double quotes whenever you refer them in a query.

Thanks,
Anjaleen


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings