Knitr produces a nice, syntax highlighted code when using a code chunk as below.
```sql
SELECT column
FROM table
```
Is it possible to achieve the same thing but with the sql code stored in a file? Something like:
```sql
read_chunk('mycode.sql')
```
I think you can use an inline R expression to achieve it:
```sql
`r xfun::file_string('mycode.sql')`
```
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With