Hello Phillipe

1-You are right that for a simple example as the one I provided, paste and
gsub give the same result.
2-For a more complex case, where let's say, I'd like to include a variable
in my SQL statement, the multi.line.paste command is essential.

variable <-1.9
multi.line.paste("
SELECT * 
FROM estimates3 a, newtable b 
WHERE a.Ticker=b.Ticker 
AND a.Fiscal_Year=b.Fiscal_Year
AND a.EPS<>b.EPS 
AND a.Date_Last_change_or_conf-",variable,">b.Date_Last_change_or_conf
",sep="")

Regards,

Pierre 

**************************************************
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{dropped}}

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to