I cannot seem to get the below FROM
clause to work using RODBC's sqlQuery
. I have taken the advice of @Lars Br. in terms of the quoting but it still does not work. I am
I know the placeholder piece works as I have used this in qlikview
Extracting Table from HANA using R
So the below code works
table <- sqlQuery(myconn, 'SELECT *
FROM "_SYS_BIC"."mytable.TABLE/ALL_DATA"')
But when I try to add the following (I am passing my date parameters in)
table <- sqlQuery(myconn, 'SELECT *
FROM "_SYS_BIC"."mytable.TABLE/ALL_DATA"')
('PLACEHOLDER' = ('$$AS_OF_DATE$$',
'2017-01-09'),
'PLACEHOLDER' = ('$$ABCD_ONE$$',
'0'),
'PLACEHOLDER' = ('$$ABCD_TWO$$',
'0'),
'PLACEHOLDER' = ('$$EFGH$$',
'12345'),
'PLACEHOLDER' = ('$$FLAG$$',
'1'))')
Now I know that my single quotes are what is messing it up so I tried the following.
- replaced all the single quotes with double quotes - This did not work
- encapsulated all the single quotes in double quotes
- removed all the single quotes completely.