Hello my dear friends ,
If i have a Query running at Presto , i need to run it at R using paste0(' ')
But some codes in this Query needs single Quotes. I tried to handle it by different methods but with no result and many errors
The code as follows
WeekDetails<- paste0('
select
week(date_add('day',1,InvoiceDate)) as Week,
B,
C,
D,
from Customers
Where
where InvoiceDate between cast( " ',StartDate , ' "as timestamp) and cast( " ',EndDate, ' " as timestamp)
and City='Cairo' ')
How can i handle characters that needs single Quotes and double Quotes ??
Errors are in lines 3,9,10
Appreciate your usual support please
Startdate and EndDate are parameters i need to input in R ShinyApp , 'day' needed to be in single quotes as a sql syntax , startdate and EndDate need to be in double quotes also as a concept in the Query