0
I have a situation more or less equal to that:
A table with the records, I need to do a search with two references, example select * from CARROS Where concessionaria= 'VW' or veiculo='VW' AND location ='São Paulo'
this search returns me all VW cars and regardless of location, it ignores the second condition.
I would need it to filter inside the "São Paulo" location to make a second filter bringing the data from cars or dealerships that I requested.
My score is like:
VW GOL SP
VW JETTA MG
it should prevent this second - because it is outside SP.
Thank you very much. That’s exactly what it was. Definition of prioritization. I put the parentheses in and it worked.
– E. Faria
Lucas, what if I add another variable? , example: select * from CARROS Where (dealership= 'VW' or vehicle='VW') AND location ='São Paulo' and status = 'active'
– E. Faria
in the latter case it is not filtering by status, because the results comes with information that is in the bank as "Inactive"
– E. Faria