Re: displaying multiple dates in a table
- From: John W. Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 07 Feb 2008 00:02:46 -0700
On Wed, 6 Feb 2008 22:00:02 -0800, jonax <jonax@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
any help/advice is much appreciated.... let me explain...
i have this table w/c have multiple date/time fields... corresponding to
birthdays of people. a single record of a person contains his birthday, his
spouse's name & birthday, and also his sons/daughters names & birthdays...
Then your table is designed incorrectly. This might be a good spread***, but
it's not a properly designed relational table.
Much better would be a table of people, with fields like PersonID, firstname,
lastname, birthdate, etc.; and a table of Relationships, with fields
PersonID1, PersonID2, Relationship. If Jane is Bill's daughter, you would have
a record in this table with Jane's ID, Bill's ID, and "Daughter" in the
relationship.
now i have already done a query in w/c i can get all persons birthday to
display per month (month parameter)...
Very easy with a properly normalized table. A reall mess with your
spread***.
i have done a query just like the one i made above, and it will display
the spouses & sons/daughters birthday corresponding to the month i typed in.
but the query also displayed all the fields including the sons/daughter
birhtday whose not born in the month i typed!
Well, of course. In a relational database query either a record (an entire
record) is retrieved, or it isn't. You have a whole lot of baggage in the
record; you're retrieving the record based on one field.
what i need help is this; is there a way to make this query wherein i type
a month ("mmm"), then the query will display ONLY the spouse's who have
birthdays on that month? w/o displaying the person's sons/daughters birthdays
who was not born on the month i typed (& vise versa in case only the person's
son was born in the month)?
many many thanx for your help in advance!!! ^_^
Again... trivially easy with the normalized design. All but impossible with
yours.
John W. Vinson [MVP]
.
- Prev by Date: Re: Using Like in Subquery
- Next by Date: Re: Using Like in Subquery
- Previous by thread: Re: displaying multiple dates in a table
- Next by thread: Re: displaying multiple dates in a table
- Index(es):