I have a MySQL table that I am acessing from R using the package "RODBC". A few of the columns has long concatenated strings separated by the STX character (\x02). I have shown a screen print of the the character below (the character is circled):
I would like to run the following query from R (RODBC package) to replace the STX delimiter with a different character:
SELECT REPLACE(columnName, '**\x02**', '#') FROM tableName
I have given the complete code below:
library(RODBC)
myconn <-odbcConnect("mydsn")
query <- "SELECT REPLACE(columnName, '\x02', '#') FROM tableName"
queryResults <- sqlQuery(myconn, query)
Is there a way to accomplish this from R?