RODBC - LIKE Operator From R to SQL Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pwag
    New Member
    • Feb 2014
    • 28

    RODBC - LIKE Operator From R to SQL Server

    Good Afternoon Pro's,

    I would have submitted this question in the R group but didn't see one.

    I am trying to connect to SQL Server from R with the RODBC Package. In my SQLQuery line I'd like to user a LIKE operator but SQL Server doesn't recognize my syntax. How is the LIKE operator written in R when connecting to SQL Server?

    Thanks,

    Here is the script.

    Code:
    dataset <- sqlQuery(dbhandle, 'SELECT * FROM table WHERE Name LIKE '%Mike%'')
Working...