Hello -
I have a query that returns records from 2 tables. I want to display the rows in an orderly fasion using ASP.
The two tables: tblSchools, tblDepts
1 school can have many depts.
So my query results look like this after displaying them after looping:
AARDVARK COLLEGE (school name)
DEPT OF FOOD (dept for AARDVARK)
AARDVARK COLLEGE (school name)
DEPT OF MATH (2nd dept for AARDVARK)
The problem is that when there is more than one DEPT for a school, the school name is repeated, obviously.
My question is how to remove the repeated school lines in my viewing page?
I know I can do it at runtime in the ASP code by comparing the SCHOOL NAME and hiding it if it matches the last, next etc.
Should I do something different with my query to make the shape of the data diffnt?
Like I said, I can do it with ASP code and that's what I'd do, but I feel like it's the long way to do it.
Let me know if you have any other ways to hide these repeated rows, other than using ASP to look at the current school name and taking action based on the comparision.
Thanks for the help as always!
I have a query that returns records from 2 tables. I want to display the rows in an orderly fasion using ASP.
The two tables: tblSchools, tblDepts
1 school can have many depts.
So my query results look like this after displaying them after looping:
AARDVARK COLLEGE (school name)
DEPT OF FOOD (dept for AARDVARK)
AARDVARK COLLEGE (school name)
DEPT OF MATH (2nd dept for AARDVARK)
The problem is that when there is more than one DEPT for a school, the school name is repeated, obviously.
My question is how to remove the repeated school lines in my viewing page?
I know I can do it at runtime in the ASP code by comparing the SCHOOL NAME and hiding it if it matches the last, next etc.
Should I do something different with my query to make the shape of the data diffnt?
Like I said, I can do it with ASP code and that's what I'd do, but I feel like it's the long way to do it.
Let me know if you have any other ways to hide these repeated rows, other than using ASP to look at the current school name and taking action based on the comparision.
Thanks for the help as always!