Artificial Intelligence Forum
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

concat

DeborahPiccoli
Discoverer
0 Likes
1,214

Hi, I'm trying to compare the gpa2r field in the dfkkbo table with the concatenation of the OPBEL, OPUPW, OPUPK, OPUBZ fields in the dffkop table. However, a wrong number of arguments in the function error occurs. Can you help me please

SELECT *
FROM DFFKBO
WHERE DOC2R = (
SELECT CONCAT(OPBEL, OPUPW, OPUPK, OPUBZ) AS CDFFKOP
FROM DFKKOP
);

1 REPLY 1
Read only

Cocquerel
Active Contributor
0 Likes
1,136

You can used the following syntax instead:
SELECT *
FROM DFFKBO
WHERE DOC2R = (
SELECT OPBEL || OPUPW || OPUPK || OPUBZ AS CDFFKOP
FROM DFKKOP
);