I want to concatenate two fields of my Access 2007 database.
This is my query:
sql="SELECT CONCAT(COGNOME & ' ' & NOME) AS NOMECOMPLETO FROM clienti WHERE NOMECOMPLETO LIKE '%Rossi Paolo%'"
But it does not work, what is the syntax error?
MS Access does not look like other SQL dialects. This should be closer to what you want:
SELECT (COGNOME & " " & NOME) AS NOMECOMPLETO
FROM clienti
WHERE (COGNOME & " " & NOME) LIKE "*Rossi Paolo*";
Changes:
CONCAT()
. &
is used for string concatentation. LIKE
is *
.
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.