Import multiline SQL query to single string

后端 未结 7 986
傲寒
傲寒 2020-12-24 03:11

In R, how can I import the contents of a multiline text file (containing SQL) to a single string?

The sql.txt file looks like this:

SELECT TOP 100 
         


        
相关标签:
7条回答
  • 2020-12-24 04:08

    I use sql <- gsub("\n","",sql) and sql <- gsub("\t","",sql) together.

    0 讨论(0)
提交回复
热议问题