Roger Blanchard
447 posts
Registered:
29 Jun 2018
04 Jan 2019
Link to this post
Our Item table as many codes that point to other tables (one to one relationship). For example, we have a DeptNum that points to the Dept table (Dept.DeptNum). We actually have 19 codes that point to other tables.
All we need is the Description field from these related tables so what I have done so far is add the Description from the related table to the eItem table and added the table as an additional source table. This does work and gives us what we need but I was wondering at what point it becomes a performance issue. It will make the source default query quite long with many outer joins. What is below only has 4 joins but if I do this for all there would be 19. Is it better to just add a calculated field to the temp table and populate in the BE ReceiveData?
METHOD OVERRIDE PUBLIC CHARACTER SourceDefaultQuery (pcTable AS CHARACTER):
@SourceDefaultQueryCaseBlock.
CASE pcTable:
WHEN "eItem":U THEN
RETURN "FOR EACH Item, FIRST UPC OF Item OUTER-JOIN, FIRST Dept OF Item OUTER-JOIN, FIRST LikeItem OF Item OUTER-JOIN, FIRST Mix OF Item OUTER-JOIN INDEXED-REPOSITION":U.
WHEN "eTotals":U THEN
RETURN "FOR EACH Totals INDEXED-REPOSITION":U.
WHEN "eHistoryTots":U THEN
RETURN "FOR EACH HistoryTots INDEXED-REPOSITION":U.
END CASE .
END METHOD.