Google BigQuery error: No matching signature for operator >=
Error Message: No matching signature for operator >= for argument types: STRING, INT64. Supported signatures: ANY >= ANY at [1:60]
while running the below R
script to fetch some data from BiqQuery
This is where I get the error:
\n\na <- dbGetQuery(db,\npaste0("select * from dta.tbl where col1='",\nsomevariable"' and date>=",substr(gsub("\\D","",as.character(start.date)),3,8),\n" and date<=",substr(gsub("\\D","",as.character(end.date)),3,8)))\n
\n\nSolution:
The data values are missing the single quote enclosure. eg date >='2019-01-01', it should work after adding the single quotes
\n\na <- dbGetQuery(db,\npaste0("select * from dta.tbl where col1='",\nsomevariable,"' and date>='",substr(gsub("\\D","",as.character(start.date)),3,8),\n"' and date<='",substr(gsub("\\D","",as.character(end.date)),3,8), "'"))\n
David-Spring
posted onEnjoy great content like this and a lot more !
Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds
Post Comment