| Author |
Topic |
|
clinton_eg
Yak Posting Veteran
60 Posts |
Posted - 2011-05-19 : 10:25:05
|
| HiI want to know how do i summarise data onto one table, if i have a different table maintaing data for each metric.Example: for Calls, Audits, Customer Experience etc.Calls Table has Emp_ID, Emp_Name, CallsAudit table has Emp_Name, AuditScoreCE table has Name, CE% (Here the Name format is different from Emp_Name)So how do i get a master table to showEmp_ID, Emp_Name, Calls, AuditScore, CE%ThanksEwan Gilby |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2011-05-19 : 10:42:19
|
| Design fault. You should have emp_id as forign key in Audit and CE tables. Then joining all three tables and getting your required result will be possible by simple query.--------------------------http://connectsql.blogspot.com/ |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
clinton_eg
Yak Posting Veteran
60 Posts |
Posted - 2011-05-19 : 11:31:23
|
| Thanks will try this out.. :)Ewan Gilby |
 |
|
|
clinton_eg
Yak Posting Veteran
60 Posts |
Posted - 2011-05-19 : 11:56:03
|
| Hi Brettwhat if i dont have Emp_ID in all tables?in this case in CEEwan Gilby |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
clinton_eg
Yak Posting Veteran
60 Posts |
Posted - 2011-05-23 : 05:11:47
|
| yes you are right, i should not be using names to do a join. Will add the Emp_ID into the tables where it is missing.. ThanksEwan Gilby |
 |
|
|
clinton_eg
Yak Posting Veteran
60 Posts |
Posted - 2011-05-27 : 10:56:54
|
| Hi I have come accross a road block. if i want to further summarise data based on date wise or month wise, how do i include thisconsidering that all my tables have date fields?Ewan Gilby |
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-06-02 : 09:11:46
|
| There are date functions that can help you summarize by day, month, year, etc. Specifically DATEADD and DATEDIFFJimEveryday I learn something that somebody else already knew |
 |
|
|
clinton_eg
Yak Posting Veteran
60 Posts |
Posted - 2011-06-02 : 10:24:43
|
| thanks jimEwan Gilby |
 |
|
|
|