Skip to Content
0
Former Member
Nov 17, 2010 at 10:37 AM

Dump on single-row subquery

429 Views

Hello,

I'm using the following select statement, which causes a dump "DBIF_RSQL_SQL_ERROR" (ORA-01427: single-row subquery returns more than one row) and I don't know why:

DATA: atbez LIKE cabnt-atbez.

SELECT SINGLE atbez FROM cabnt INTO atbez

WHERE atinn = '0000002134'

AND spras = 'D'

AND adzhl =

( SELECT MAX( adzhl ) FROM cabnt WHERE atinn = cabnt~atinn

AND spras = 'D'

GROUP BY atinn spras ).

Why does the subquery return more than one row, if ATINN, SPRAS and ADZHL are the only key fields of table CABNT?

Can anybody help me?

Thanks

Daniel