Re: Map a person to an Account
- From: "FrankTimJr" <Frankie69_98@xxxxxxxxx>
- Date: Sun, 11 Dec 2005 20:41:52 -0500
Yes, the "map" I'm referring to means (and I forgot to include this in my
original message) is, every week I receive a data dump from an Orders
database. The Orders database unfortunately does not have Sales Rep tied to
each order (that would be too logical!). Part of my job is to map or link
each order with a Sales Rep. Some reps manage accounts all over the
country, where other Sales Reps manage a set of Zip Codes. I have both the
SalesPeople table, and the Account mapping table already set up all with the
assigned Sales Reps, both by Account Number, Account Name and Zip Codes.
I just need to figure out how to marry the Account mapping table with the
Orders table, but, using three different lookups as I stated in my original
message.
tbl_AccountMapping
AccountNumber (primary key)
AccountName
<All address fields, inlcuding Zip Code)
PersonID
tbl_Orders
OrderNumber(primary key)
AccountNumber
AccountName
ZipCode
<all other order detail related fields>
I want to first lookup on AccountNumber, then, all "non-matches" (where the
lookup does not locate a SalesRep from tbl_AccountMapping) use AccountName
instead, then, all additional "non-matches", use the Zip Code, and lastly,
there are some zip codes that are not assigned to a Sales Rep, I need to see
those as well, but not sure where to map them yet...perhaps if there was a
default SalesRep (a ficticious SalesRep) that everything else would get
mapped to, that might solve it.
Hope this makes it more clear on what I want to accomplish. Again, I
perform all the above actions in Excel, but it takes me one business day to
finish the entire Order Mapping (and this happens every week).
I appreciate any assistance.
Thanks,
Frank
"tina" <nospam@xxxxxxxxxxx> wrote in message
news:_z2nf.266961$zb5.43264@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> can you explain what you mean by "map"?
> presumably you have a table that lists all salespeople, and a table that
> lists all accounts and includes account number and account name fields,
> and
> possibly address fields as well, including a ZipCode field. if each
> account
> may have only one sales person assigned to it, then you would have a
> foreign
> key field in the accounts table also, which would link to the primary key
> field of the salespeople table, as
>
> tblSalesPeople
> PersonID (primary key)
> FirstName
> LastName
> (other fields that describe a sales person)
>
> tblAccounts
> AccountNumber (primary key)
> AccountName
> PersonID (foreign key from tblSalesPeople)
> (other fields that describe a sales person)
>
> the relationship would be tblSalesPeople.PersonID 1:n tblAccounts.PersonID
>
> i'm guessing that the above information does not answer your question, but
> hopefully it gives you an idea of how the tables are related in Access.
> since Access and Excel handle data *very* differently, can you explain
> more
> fully what you're trying to do? then perhaps we can help you craft a
> solution that works in Access.
>
> hth
>
>
> "FrankTimJr" <Frankie69_98@xxxxxxxxx> wrote in message
> news:ycqdnejSRZEJFQHenZ2dnUVZ_sCdnZ2d@xxxxxxxxxxxxxx
>> I'm attempting to design a database that will map a Sales person to their
>> respecitve accounts and / or territories. I can perform this action in
>> Excel, but it takes far too long and many manual steps to get it right
>> and
>> I'm wondering if Access can help with it.
>>
>> There are three levels of mapping, the first level is the Account Number,
>> the second is the Account Name (if there is no match on the Account
> Number,
>> and the third is matching against Zip Codes if neither of the above two
>> steps do not find a matching Sales person.
>>
>> Is it at all possible to get Access to do this in one query?
>>
>> To summarize, Map a Sales Person to an Account Name, if no match, map
>> against the Account Name, if no match, map against Zip Code, and finally,
> if
>> all three do not get a match, I'd like to spit that out somehow as well.
>>
>> Any ideas??
>>
>>
>
>
.
- Follow-Ups:
- Re: Map a person to an Account
- From: Tom Ellison
- Re: Map a person to an Account
- From: tina
- Re: Map a person to an Account
- References:
- Map a person to an Account
- From: FrankTimJr
- Re: Map a person to an Account
- From: tina
- Map a person to an Account
- Prev by Date: Re: A query to accumulate data
- Next by Date: Re: Map a person to an Account
- Previous by thread: Re: Map a person to an Account
- Next by thread: Re: Map a person to an Account
- Index(es):
Relevant Pages
|