Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: Re: Showing parent info once with child info many


Message #1 by "Sara Petty" <spetty@w...> on Mon, 6 Aug 2001 16:18:20
Works like a charm Ü. Thanks for the advice, Ken.



Sara Ü



> 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?

> :


  Return to Index