Here is my sql statement
SELECT m.id
FROM (SELECT id, plu FROM product) t
join position m ON m.plu_id LIKE '%' + @t.plu
but got such error operator does not exist: @ character varying
This answer did not help
Here is my sql statement
SELECT m.id
FROM (SELECT id, plu FROM product) t
join position m ON m.plu_id LIKE '%' + @t.plu
but got such error operator does not exist: @ character varying
This answer did not help
The + operator in Postgres -- and in SQL in general -- is addition of numbers. That SQL Server extends this definition to include string concatenation is bespoke syntax for that database (and Sybase).
Use the correct candidate operator:
ON m.plu_id LIKE '%@' || t.plu
I assume that the @ is really a constant character that should be part of the pattern.
@tdeclared? What is it? What is@t.plu?||. The+is to add numbers. And@is invalid in an identifier in SQL as well.select .. from product t join position m ...