0
I’m trying to search for records in a table where the product does not have certain characteristics. I would like to display only the records that do not have these characteristics, even if there are several others, I tried with the query below, it almost worked, rs. Thank you for your attention and collaboration.
select CODPROD
from PRODUTOS
left join (select CODPROD as CODPROD1, CARACT
from PRODUTOS
where DTFIM = '99991231'
and CARACT in ('X001','X002','X003')
and CODPROD <> ' '
group by (CODPROD,CARACT))
on CODPROD = CODPROD1
group by CODPROD
I didn’t understand the need for a subquery, what exactly do you want to bring? It would be the CARACT in ('X001','X002','X003') or the denial of it?
– Daniel Mendes