Delphi 7 :: MS SQL 2005 SQL Statement for Rave Report
Posted on 2007-11-26
I have the following tables:
tblPartTypes -> tblParts -> tblPartBOMS (bill of material).
In tblPartTypes I have a field: PrintBOM :Integer (0 = False; 1 = True)
This field is a parameter setting based on the Part Type.
I want to print a list of all parts (tblParts) grouped by part type (tblPartType) and depending on the parameter (field :PrintBOM) it should also print the bill of material (tblPartBOMS) for each part. Is this possible?
Select all PartTypes and all the Parts linked to a PartType AND if the PartType field, PrintBOMS = TRUE, then also get the PartBOMS for each Part in this particulare PartType grouping.
Hope this is clear, if not please ask and I will try to explain it better.