Mysql r-将多个参数传递给dbGetQuery()?内连接
有人知道问题出在哪里吗?我用的是RStudioMysql r-将多个参数传递给dbGetQuery()?内连接,mysql,r,Mysql,R,有人知道问题出在哪里吗?我用的是RStudio sqlStatement <- dbGetQuery(con,"SELECT concat(official_test_cases.id,')', official_test_cases.test_case_name) As id, if (test_cases.description) = "NULL",official_test_cases.name, concat(official_test_cases.name," ", test_c
sqlStatement <- dbGetQuery(con,"SELECT concat(official_test_cases.id,')', official_test_cases.test_case_name) As id, if (test_cases.description) = "NULL",official_test_cases.name, concat(official_test_cases.name," ", test_cases.description)AS text
FROM official_test_cases
INNER JOIN test_cases ON official_test_cases.test_case = test_cases.id
WHERE !is.null(official_test_cases.name) && !is.null(official_test_cases.id) && !is.null(test_cases.description)")
sqlStatement可能是双引号的问题。您应该尝试在完整字符串的开头和结尾处仅使用双引号。如果查询中有double,R将不会以预期的方式解析它
简而言之,将“NULL”
更改为“NULL”
,看看这是否有区别。它会在表达式后继续显示“预期错误”