| Author |
Topic |
|
baze7
Yak Posting Veteran
58 Posts |
Posted - 2010-03-16 : 09:57:08
|
| With a outer join, is it possible to combined records onto one?I will try to explain:left outer join (select distinct count(emp_num) as EmpCount,emp_num from employeegroup by emp_num) as emp on emp.emp_num = jobtran.emp_numIf this returns, lets say 2 different emp_num, let say 2 and 5 could I have it combined to 2 and 5 into 1 column (for lack of better term)Does that make sense? So my record set could look something like:1 1,22 1,2ThanksChad |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-16 : 10:03:35
|
| what does that mean? do you mean showing counts for 2 ids on same column?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
baze7
Yak Posting Veteran
58 Posts |
Posted - 2010-03-16 : 10:08:27
|
| Yes |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-16 : 10:13:50
|
| whats the need for that? what sense does it make to show two counts of unrelated ids in single column ?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
baze7
Yak Posting Veteran
58 Posts |
Posted - 2010-03-16 : 10:18:12
|
| I am running a trigger and I am emailing the results. I have all information emailing like I need it, but when there are mutiple emp_nums, I want that included in the email. The emp_num is the only return that could have multiple recordsets. Maybe there is a different way to do what I am trying to do? That help at all? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-16 : 10:20:32
|
| even in that case isnt it better to mail it like belowemp_num count1000 151023 44...------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
baze7
Yak Posting Veteran
58 Posts |
Posted - 2010-03-16 : 10:22:50
|
| We want to see the employee number in the email |
 |
|
|
baze7
Yak Posting Veteran
58 Posts |
Posted - 2010-03-16 : 10:29:08
|
| OK, I see what you are saying, yes but I am not sure how to do that in my code. Would it help if I post my code? |
 |
|
|
nhess80
Yak Posting Veteran
83 Posts |
Posted - 2010-03-17 : 15:52:35
|
| Can you post your code and some sample data and an example of the result you are looking for? |
 |
|
|
|