Normal Topic Update Addresses database from external file? (Read 931 times)
antiques23
Member
*
Offline



Posts: 10
Joined: Apr 29th, 2009
Update Addresses database from external file?
Nov 12th, 2010 at 1:35am
Print Post Print Post  
Hi,

So our family business sends out a marketing mail-out each Christmas to the customers who live in our home state. We have records going back at least as far as 1994. Each year we export mailing list address data and give it to a local marketing company. This company cross checks the addresses with the US Postal Service and gives us back a list of addresses that are no longer valid and a list of addresses that have changed (including what the new addresses are). Unfortunately, we have never updated our master database with any of these changes over the years, so the accumulated changes are pretty numerous.

My question: Is there a way to automatically update our database with these corrections (deleting certain records, updating others) using these external CSV files or do we have to change things by hand?

Thanks,
Mark
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Update Addresses database from external file?
Reply #1 - Nov 12th, 2010 at 4:31pm
Print Post Print Post  
Hello,

Are the list of addresses that are no longer valid and the list of corrected or changed addresses in two separate CSV files?

Do the records have a unique field in them in the database and in the returned CSV files?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
antiques23
Member
*
Offline



Posts: 10
Joined: Apr 29th, 2009
Re: Update Addresses database from external file?
Reply #2 - Nov 12th, 2010 at 5:03pm
Print Post Print Post  
Yes, there are two different CSV files. One for the no-longer-valid addresses (for which a newer address could not be found) and one for the updated addresses.

When you ask about a unique field, do you mean something like a customer number that is unique to each customer? If so, the answer is no (unfortunately). Each entry in the database will have a unique invoice number because the information gets input at the point of sale, but any given customer could have shopped with us dozens of times and thus will be tied to dozens of invoice numbers. That question, alone, makes me think we might be up a creek...

-Mark
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Update Addresses database from external file?
Reply #3 - Nov 12th, 2010 at 10:16pm
Print Post Print Post  
Hello Mark,

Yes something like a customer number, and I was afraid the answer would be no. It is possible to do the update without one but where you run into trouble is if there are 2, or more, people with the same name of John Smith. Sesame has no way of knowing logically which John Smith the new address is for.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
antiques23
Member
*
Offline



Posts: 10
Joined: Apr 29th, 2009
Re: Update Addresses database from external file?
Reply #4 - Nov 13th, 2010 at 3:45pm
Print Post Print Post  
This may be too broad a question to ask without someone seeing all the details of our particular database setup, but is there a way to retroactively program in a feature such as a unique customer number? Or to include it from this point forward? Or would that be completely pointless without having had it from the inception of the database?
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Update Addresses database from external file?
Reply #5 - Nov 13th, 2010 at 4:14pm
Print Post Print Post  
antiques23 wrote on Nov 13th, 2010 at 3:45pm:
This may be too broad a question to ask without someone seeing all the details of our particular database setup, but is there a way to retroactively program in a feature such as a unique customer number? Or to include it from this point forward? Or would that be completely pointless without having had it from the inception of the database?


Yes. You can add the field and a small bit of programming to assign the ID to new records. Use a mass update to assign a unique number to existing records. You would still need to find some way to correspond the record in your current ASCII file with a record in the Sesame database. But, it would help with future operations like this.

Are there multiple fields you can combine in the current ASCII file to uniquely identify a record in the application?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
antiques23
Member
*
Offline



Posts: 10
Joined: Apr 29th, 2009
Re: Update Addresses database from external file?
Reply #6 - Nov 13th, 2010 at 4:59pm
Print Post Print Post  
Well, perhaps. The ASCII file contains fields for name, address, city, state, and zip for both the new address (as updated by the USPS) and the old address (as it currently exists in our database). For example, here are all the fields listed in the file (the last three are sorting data from the USPS that are not pertinent to our database):

First Name(s); Last Name; Delivery Address; City; State; Zipcode; Delivery Address Before NCOA; City Before NCOA; State Before NCOA; ZIP Before NCOA; Return Code; DPV Confirmation; DPV Footnotes

Is there a way to use the "Before NCOA" data to reference the new, updated data to make the change in our system?

Thanks for you input with all this,
Mark
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Update Addresses database from external file?
Reply #7 - Nov 13th, 2010 at 7:12pm
Print Post Print Post  
Quite possibly, you could try to match the old address against the "current" address you have in your database, and match the first and last name of customer against the PO record. That should probably give you a reasonable success rate. Of course, there will be some problems when trying to match names and addresses. For example, you may have:

John McThurby
1100 Wilson
Tucson, Ohio 44234

And they may have:

John McThurby
1100 Wilson Ave.
Tucson, OH 44234-9901

In any case, it would be wise to go ahead and assign a unique ID. Almost always useful in the future.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
antiques23
Member
*
Offline



Posts: 10
Joined: Apr 29th, 2009
Re: Update Addresses database from external file?
Reply #8 - Nov 13th, 2010 at 9:08pm
Print Post Print Post  
So if that were to work, what would be the actual procedure I would use to search, match, and replace entries between the ASCII file and the existing database? I'm not overly well versed in Sesame. Learning as I go...
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Update Addresses database from external file?
Reply #9 - Nov 13th, 2010 at 10:01pm
Print Post Print Post  
antiques23 wrote on Nov 13th, 2010 at 9:08pm:
So if that were to work, what would be the actual procedure I would use to search, match, and replace entries between the ASCII file and the existing database? I'm not overly well versed in Sesame. Learning as I go...


I'm a programmer, so I tend to lean towards a programmed solution. Do you program at all, in any application or programming language?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged