This is the query I have currently:
select * from outerb where not exists(
Select * from wms
where wms.barcode = outerb.barcode);
This query returns me values that I need.
So far so good...
Next I needed to select a specific column (in this case pcode) that have no values written in there. Here is what I have tried and worked absolutely fine for me:
select * from outerb where not exists(
Select * from wms
where wms.barcode = outerb.barcode)
and pcode = "" or pcode is null;
But when I add another column to the query, it returns me empty column for pcode but for the new column, it returns me empty values and with filled values. Which is I am confused about. This is what I have tried:
select * from outerb where not exists(
Select * from wms
where wms.barcode = outerb.barcode)
and pcode = "" or pcode is null
and
brand = "" or brand is null;
Pcode works absolutely fine but brand doesn't.. whats the problem?
But if I reverse the two, so brand comes first in the query and pcode comes 2nd, its pcode this time that shows up with values and brand without values.
Both columns are Varchar type