I have an SQL with two files:
First file PRODUCTS: (PRD) PRODUCT FIELD
Second file STOCK: (PRD2) FIELD PRODUCT, (STOCK) FIELD STOCK
If I do one:
Select PRD, STOCK from PRODUCTOS inner join STOCK ON PRD=PRD2
It clearly returns the products that have stock.
But I do not want that. Since there are more records in the product file than in the stock.
If I do it with a left join, I get null as a result in the stock field in the references that being in the first file is not in the second, but I want to put a zero.
I've tried with case ... and coalesce .. but it keeps coming out null. Can you help me?
Thanks