I am using latest JDBC Driver from Google/Simba. I am getting this error when we have a secondary force index as well as with Query Parameter
Simba]SpannerJDBCDriver Error message from server: INVALID_ARGUMENT: Positional parameters are not supported
SELECT s.SingerId, s.FirstName, s.LastName
FROM Singers@{FORCE_INDEX=SingersByFirstLastName} AS s
WHERE s.FirstName = ?
Cloud Spanner's dialect of SQL does not support positional parameters. Parameters in Cloud Spanner's dialect of SQL are specified using a @
followed by an identifier, for eg
SELECT s.SingerId, s.FirstName, s.LastName
FROM Singers@{FORCE_INDEX=SingersByFirstLastName} AS s
WHERE s.FirstName = @first_name
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.