1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] DB2 Usage of two combined fields in 'IN' operator

Discussão em 'Outras Linguagens' iniciado por Stack, Novembro 7, 2024 às 11:22.

  1. Stack

    Stack Membro Participativo

    I want to write a sql with in operator over two fields, but this ending in a sql error

    [Code: -811, SQL State: 21000] The result of a scalar fullselect, SELECT INTO statement, or VALUES INTO statement is more than one row.. SQLCODE=-811, SQLSTATE=21000, DRIVER=4.28.11


    My sql condition looks like

    AND
    (
    SELECT car.id1
    FROM SYSIBM.SYSDUMM1
    UNION ALL
    SELECT car.id2
    FROM SYSIBM.SYSDUMM1)
    IN
    (SELECT inn_car.id
    FROM....
    )

    Continue reading...

Compartilhe esta Página