Artificial Intelligence and Machine Learning Discussions
Engage in AI and ML discussions. Collaborate on innovative solutions, explore SAP's AI innovations, and discuss use cases, challenges, and future possibilities.
cancel
Showing results for 
Search instead for 
Did you mean: 

concat

DeborahPiccoli
Discoverer
0 Kudos

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

Cocquerel
Active Contributor
0 Kudos

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