SQL translate issues
mdsumner opened this issue · comments
Michael Sumner commented
Laundry list
paste() not available for GDB
What's the OGRSQL concat?
transmute(adddress = paste(ST_NO_FROM, STREET))
Error in CPL_read_ogr(dsn, layer, query, as.character(options), quiet, :
Query execution failed, cannot open layer.
In addition: Warning message:
In CPL_read_ogr(dsn, layer, query, as.character(options), quiet, :
GDAL Error 1: Undefined function 'CONCAT_WS' used.
It's CONCAT
works with transmute(), and mutate() but not with select()
transmute(address = CONCAT(LOCALITY, STREET))
so this works
sf::read_sf(files$fullname[1], query = "SELECT CAST(ST_NO_FROM AS character(255)) FROM list_address_points_statewide WHERE LOCALITY = 'Glenora'")
but this does not, I think because it requires a subquery and we can't
lazysf(files$fullname[1], sql("SELECT CAST(ST_NO_FROM AS character(255)) FROM list_address_points_statewide WHERE LOCALITY = 'Glenora'"))
Error in CPL_read_ogr(dsn, layer, query, as.character(options), quiet, :
Query execution failed, cannot open layer.
In addition: Warning message:
In CPL_read_ogr(dsn, layer, query, as.character(options), quiet, :
GDAL Error 1: SQL Expression Parsing Error: syntax error, unexpected '(', expecting string or identifier. Occurred around :
SELECT *