Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing out a location in two diferent databases

Status
Not open for further replies.

ziggs

Technical User
Sep 21, 2000
195
US
I'm trying to tie to separate databases together based on a location. However, each DB handles locations differently. I'll explain the fields:

DB1 - The address has only three fields for a location:
digits Street_Name Apartment
123 Main St #5
456 S Main St
123 Jack Spree Rd
123 Calle Oriente

DB2 - The address has five fields for a location:
dig Dir Street Type Apt
123 Main St 5
456 S Main St
123 Jack Spree Rd
123 Calle Oriente

Anyway, I have a Crystal Report that will check DB1. What I'm trying to do is click on the street name that will open up a sub report, parse out the street name correctly, and query DB2 to get the data for the same exact address. As seen from the above examples of the databases, The digits and apartment fields are not a factor. The problem is that the street name in DB one has to be broken down into three different fields to query DB2. The four examples that I give shows the uniques problems to most of translation problems that could occur. I might have more, but I can cross that bridge later.

Any ideas about the formula I should use? I did have one thought on the Direction. If DB1.Street_name starts with N, S, W, or E and has a space after it, dump that into DB2.Dir, then start with 3rd character to begin street name. Now, parsing out the street name with multiple variables that pop up is where I'm losing it.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top