Separate SQL

1 · John MacKintosh · Feb. 8, 2022, 10:47 p.m.
I did a tweet earlier which was slightly less nonsense than usual. Shocker, I know. I don’t think the idea of having SQL files being kept separate, rather than having a SQL query either embedded or called within an R script, is that controversial. But some folk clearly have not thought to try it before. So, in R terms, rather than having a connection defined, and then pasting a SQL query into a DBI call, I’d be doing something like this: source(here("01-con.R")) To clarify - the above would ma...