Solved

Run SQL query on database with dots in the table name

  • 26 January 2023
  • 1 reply
  • 298 views

Badge +1

Hello,

I am trying to use database procedure function to extract some data from a HANA view database.

Unfortunately, table name has dots (“.”), so it seems like AIMMS cannot parse it for SQL query properly. For example, the table name is something like xx.yy.zz/pp, where you can see some dots between xx, yy, and zz.  

Can you help us to figure out proper syntax to write sql query with this type of name?

Thank you!

 

 

icon

Best answer by Mischa 27 January 2023, 10:18

View original

1 reply

Userlevel 3
Badge +6

Hi,

 

I am not sure which database server you are using, but I tried this out on a MySQL database with a table called Mischa.Dot.Test. The following syntax works:

 

select * from testDBMS.`Mischa.Dot.Test`;

 

However, when searching on the Internet about this, using dots in table names is not considered as good practice. See the remarks made here, for example.

 

Kind regards,

Mischa

 

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator