On 11-Oct-11 09:23, arunkumar1111 wrote:
Hi

I want to add a double quote to a string

eg


Expected output = DROP TABLE  IF EXISTS "abc"

My code

tab=c("abc")
query = paste("DROP TABLE IF EXISTS ",tab,sep="")

query = paste("DROP TABLE IF EXISTS \"",tab,"\"", sep="")

or
query = paste('DROP TABLE IF EXISTS "',tab,'"', sep="")

and tab="abc". no need for c()
Ciao!
                                mario


Please help me to solve this problem


--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-add-a-double-quote-to-a-string-tp3893061p3893061.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

--
Ing. Mario Valle
Data Analysis and Visualization Group            | http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to