Question widgets disappear when added to dashboard

Yes, you are no doubt 100% correct that the error is coming from the DB.
What I failed to explain clearly, was that when Metabase uses “=” where it should use “IN” for an object comparison, since the value being handled at that point is a list ( sequence of values ), rather than a single value, of course the DB will object. It is the strange way that the DB objects that I am puzzling through. (see error message below)

This works:

where UPC like ‘00000%’
[[ AND ({{dept_number}}) ]]

when the field filter is set is set match against the DEPT column (integer), and the default value is:

123 456 789

It seems that “IN” is applied, with no errors, returning expected results.

This doesn’t work:

where UPC like ‘00000%’
[[ AND ({{dept_number}}) ]]
[[ AND RIGHT(({{upc_alphanum}}), 9) ]]

when the field filter is set match against the UPC column (text), and the default value is:
987654321 123456789 192837465 918273645

Full Error Message: Incorrect syntax near ‘=’.

So, with no ‘=’ to be seen in the “question”, it must be Metabase that is using “=”.

Other “default” values attempted, with same error message:
987654321, 123456789, 192837465, 918273645
(987654321, 123456789, 192837465, 918273645)
‘987654321 123456789 192837465 918273645’
(‘987654321 123456789 192837465 918273645’)
‘987654321’ ‘123456789’ ‘192837465’ ‘918273645’
(‘987654321’ ‘123456789’ ‘192837465’ ‘918273645’)
‘987654321’, ‘123456789’, ‘192837465’, ‘918273645’
(‘987654321’, ‘123456789’, ‘192837465’, ‘918273645’)

Diagnostic Info:
{
“browser-info”: {
“language”: “en-US”,
“platform”: “Win32”,
“userAgent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.5+10-post-Ubuntu-0ubuntu1.118.04”,
“java.vendor”: “Private Build”,
“java.vendor.url”: “Unknown”,
“java.version”: “11.0.5”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.5+10-post-Ubuntu-0ubuntu1.118.04”,
“os.name”: “Linux”,
“os.version”: “4.15.0-1057-aws”,
“user.language”: “en”,
“user.timezone”: “Etc/UTC”
},
“metabase-info”: {
“databases”: [
“postgres”,
“sqlserver”,
“redshift”
],
“hosting-env”: “unknown”,
“application-database”: “postgres”,
“run-mode”: “prod”,
“version”: {
“date”: “2020-01-13”,
“tag”: “v0.34.1”,
“branch”: “release-0.34.x”,
“hash”: “265695c”
},
“settings”: {
“report-timezone”: null
}
}
}