Click here to Skip to main content
15,891,529 members

Comments by jamuro77 (Top 7 by date)

jamuro77 14-Dec-16 2:41am View    
I don't understand well your results. What is obtained date in tour first point? The minimum date? And with regard to second point, is "date difference" set with origin in "initial date"?
jamuro77 9-Dec-16 3:21am View    
I know it. For this reason, you have several solutions:

1) Use your first query to load a new variable table and then apply UNPIVOTING as described above.
2) Use a Common table expression to encapsulate your first query and then apply UNPIVOTING over it.
You will get the desired results.
jamuro77 9-Dec-16 1:46am View    
It would be necessary to know more about, at least two issues:
1) Which is the correct result set you are looking for?
2) Further information about data in tables
jamuro77 1-Dec-16 6:13am View    
You can't group two times by the same fields. There's no sense. You can obtain "count" or "sum" separately but not together. I think that you need a field not grouping by EmployeeID and UserID. Expected results would be necessary to elaborate a solution...
jamuro77 30-Nov-16 3:11am View    
Could you add the tables structure related to your query? If not, It's diffcult to know...