This problem is caused by the way STRINGS are encapsulated in quotes. In this scenario this happens in two levels:
- R command parameter (sqlFetch ( connection-object-parameter, sql-string-parameter)
- HANA SQL where the literal string for the table name is required
You used the double-quotes encapsulation for both steps. In each of those two steps the strings get extracted from the parameter you used, which includes the removal of the outermost encapsulation markers which are the double-quotes here.
So, after step 1 the double quotes are gone and HANA receives a string without them.
This is OK, as long as you don't actually require the double-quotes for your identifiers, but in your example you actually do. (case sensitive identifiers with special characters like / or . require the double quotes).
The solution to this is rather simple: R allows both single (') and double (") quotes to be used for string encapsulation.
Just use single quotation marks in R to hand over the string:
mydate <- sqlFetch(myconn, '_MY_SCHEMA."My.Table.Name/Table_ONE"')
Notice: you still have to encapsulate "My.Table.Name/Table_ONE" in double quotation marks so that HANA will handle this identifier correctly.
For the connection R to HANA there are also a couple of blogs out: