Valdrin Posted November 10, 2010 Posted November 10, 2010 Hi all I have a table for customers and a child table for their multiple address (work, home, billing, shipping, etc.). When I need to print envelopes for a found set, what is the best way to select among the multiple addresses for the customers? Thanks!
bcooney Posted November 11, 2010 Posted November 11, 2010 That really all depends. I often store a preferred addressID in the Customer table. Then, that's the address I'll use for mailings.
Valdrin Posted November 13, 2010 Author Posted November 13, 2010 That will certainly work, but I was wondering if there was another way to do it without storing the information in the customer table. Is there a way to set a flag on the records in the address table and use that when printing a found set?
bcooney Posted November 14, 2010 Posted November 14, 2010 If you set the flag_Preferred in Addresses, then you need to make sure to clear any previously flagged records. Why are you uncomfortable with setting the ID in the parent? This is the best way of storing a "preferred" child. Here's a simple demo. PrefAddr.fp7.zip
Valdrin Posted November 14, 2010 Author Posted November 14, 2010 I'm not really uncomfortable with having preferred address fields in the parent table, and that is what I have mostly done in the past. RIght now I'm working on a solution where all the customers have multiple phones, emails, and addresses, and duplicating all of the fields from those three child tables into the parent table seemed like a lot of replicated data, so I was just wondering if there was another way to handle it, or if storing preferred fields was the only practical way do it. Thanks for your help.
bcooney Posted November 15, 2010 Posted November 15, 2010 I am not duplicating any fields. I am storing a KEY in the parent.
Recommended Posts
This topic is 5468 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now