1
I am doing a query in Oracle Database 12C and I have a problem: I want only products that have address_1 as 'A' appear in my ResultSelect
.
In the example below the item "code: 312107" it has two addresses: 'P' and the 'A' and I want my select
bring all the items you own only the address 'A'.
If I filter in WHERE endereco_1 not in ('P','S','V')
or endereco_1 =
'A'
this product below will continue to appear.
I need a condition where if the product has ('P' + 'A')
in the endereco_1
then does not appear in the resultselect
, if you have only 'To' and nothing more, may appear.
Augusto, I couldn’t see your print, but see if anything in the line below helps you: SELECT * FROM TABLE A1 WHERE A1.ENDERECO = 'A' AND A1.ID NOT IN ( SELECT A2.ID FROM TABLE A2 WHERE A2.ADDRESS IN ('P', ’S', 'V'))
– NDelavi