Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL error for blank child table
Could somone tell me how to generate an SQL output where 2 tables are conditionally linked, for the following situation:
There is a stock_in table (where stock is brought in) , and an issues table (where stock is issued). The SQL creates an output for issues of a selected product (from the stock_in), which is linked to the issues table by a join statement on the product_id.
My problem is that output is generated so long as there are records corresponding to the stock_in product_id in the issues table. In case the issues table has no issues corresponding to the product_id, it generates an error.
Thanks a lot
Regards,
Steve.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement