Last post May 18, 2016 06:47 AM by TechView
May 17, 2016 04:44 PM|yzidell|LINK
I have these tables - tblPrintAreas and tblPrintAreaBoxes with these fields:
Font, FontSize, OrderNumber, PrintAreaID, PrintAreaBoxID
each PrintArea has multiple PrintAreaBoxes
I need a query to get all the rows for a PrintArea - but with Font listed once.
I tried DISTINCT and GROUP BY but I had no success.
can you help me out, please?
May 17, 2016 04:51 PM|ryanbesko|LINK
Which fields are in which tables?
For future reference you should post DDL script to make the temp tables and sample data needed for a forum answerer to be able to easily help.
May 17, 2016 05:06 PM|yzidell|LINK
tblPrintAreaBoxes: PrintAreaID, PrintAreaBoxID, Font, FontSize, OrderNumber
May 17, 2016 05:10 PM|ryanbesko|LINK
What do you mean by "Font listed once"? Couldn't the PrintAreaBoxes for a PrintArea have different font values or are they all the same?
Are you trying to format this for display on a screen or report or something? So it lists the font for the first row but not for the other rows? If so that should be handled in the user interface, not the database query.
May 17, 2016 05:19 PM|yzidell|LINK
May 18, 2016 06:47 AM|TechView|LINK
Hello yzidell! Please refer to the following thread:
I've given a solution to the similar problem. Hope helps.