|
 |
asp_database_setup thread: Showing parent info once with child info many
Message #1 by "Sara Petty" <spetty@w...> on Fri, 20 Jul 2001 18:19:06
|
|
When you have a parent-child relationship in tables and you want to
display information, you can create a SQL statement to show all the
information. The problem is that the information in the parent table will
be repeated over and over. Example:
Physics PHSX 1010 7:30 AM Fall Semester
Physics PHSX 2010 8:30 AM Spring Semester
Physics PHSX 2020 9:30 AM Summer Semester
I would like to display the word "Physics" only one time while having the
courses listed below.
Does anyone know the code that will only show the field if the field above
is not the same?
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 26 Jul 2001 23:02:24 +1000
|
|
Store the value of the subject for the first record (strSubject = physics).
When you loop through the recordset check the value of the current subject
against the subject you have stored. If it is the same, then write the
details out.
If the subject is different, update strSubject, close the current table,
start a new table, write out the new subject heading.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: "Sara Petty" <spetty@w...>
To: "ASP Database Setup" <asp_database_setup@p...>
Sent: Friday, July 20, 2001 6:19 PM
Subject: [asp_database_setup] Showing parent info once with child info many
: When you have a parent-child relationship in tables and you want to
: display information, you can create a SQL statement to show all the
: information. The problem is that the information in the parent table will
: be repeated over and over. Example:
:
: Physics PHSX 1010 7:30 AM Fall Semester
: Physics PHSX 2010 8:30 AM Spring Semester
: Physics PHSX 2020 9:30 AM Summer Semester
:
: I would like to display the word "Physics" only one time while having the
: courses listed below.
:
: Does anyone know the code that will only show the field if the field above
: is not the same?
:
: ---
: Search the best ASP Web sites using CodeHound! http://www.codehound.com
: Now it's easy to find ASP source code on the Internet. CodeHound's free
: search engine will categorize your results and even search for ASP code
: compressed in Zip files on the Internet. Stop searching dozens of
: different sites to find what you want...try CodeHound right now!
ken@a...
$subst('Email.Unsub')
|
|
 |