Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL Help -- This there a way
Is there a way to get the default components\ratings for a part if a category does not exist? And if the category does exist to get only those components ratings for that category?
Simiplified DB setup
A Part is has one or more components.
Components have one or more ratings.
Ratings of components for a part are grouped under a category.
A Catetgory are linked to the Part. There may be one or more categories for this part.
Is there one SQL statement that can
1. If I feed it an existing category, return only the components and ratings for that category. (Part is known)
2. If I feed it a non exisint category, return only the components with ratings of zero. (Part is known)
Thanks for any help
Bob
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