SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How should I setup this table(s)?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Goalie35
Yak Posting Veteran

78 Posts

Posted - 07/02/2010 :  11:50:33  Show Profile  Reply with Quote
I need to display data about all of our sales reps onto a webpage. The problem is, we have thousands of sales reps located in a bunch of different locations and many of these locations contain different data about their reps.

For example, Branch 1 may contain a sales rep's personal phone number and their "Branch ID". Branch 2 doesn't contain personal phone number's or BranchID's. Instead of BranchID, they group their reps by what they call "Territory ID's".

So basically, I need to build some tables to create a centralized location of all rep data. Some of the fields would be obvious such as RepID, Rep First Name, Rep Last Name, etc. But how do I build the table so that branch 1 rep records also contain their "Branch ID", Branch 2 reps contain their "Territory ID", etc? There's roughly about 100 different variable categories like these across all of our sales reps & branches.

Any idea how to setup these variable fields into a clean, organized fashion?

Thanks.

denis_the_thief
Aged Yak Warrior

Canada
591 Posts

Posted - 07/02/2010 :  16:43:00  Show Profile  Reply with Quote
This may or may not work:

Territories
------
*TerritoryID
TerritoryName


Branches
-------
BranchID
BranchName
BranchIdentificationNumber (nullable)
TerritoryID (nullable)


SalesReps
---------
SalesRepID
BranchID
Name/info...

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000