Skip to main content
16 events
when toggle format what by license comment
Dec 12, 2019 at 14:03 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Aug 9, 2019 at 1:02 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Apr 7, 2019 at 23:02 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Feb 20, 2015 at 17:03 history edited Corey CC BY-SA 3.0
added 12 characters in body
Feb 20, 2015 at 16:53 history edited Corey CC BY-SA 3.0
added 7 characters in body
Feb 20, 2015 at 15:57 answer added James Anderson timeline score: 1
S Feb 20, 2015 at 15:03 history suggested LowlyDBA - John M CC BY-SA 3.0
formatting
Feb 20, 2015 at 15:02 comment added Corey @JamesAnderson that's exactly what I'm trying to achieve. I'm guessing I need to amend the constraints of locating exact matches in the personID, Month, and Year columns of each table?
Feb 20, 2015 at 15:02 comment added Corey @SteveMangiameli, thank you, I'll try an OUTER join and see what that gets me...
Feb 20, 2015 at 15:00 review Suggested edits
S Feb 20, 2015 at 15:03
Feb 20, 2015 at 14:55 comment added Corey @JohnM The table schemas are now included.
Feb 20, 2015 at 14:53 history edited Corey CC BY-SA 3.0
added 641 characters in body
Feb 20, 2015 at 8:58 comment added James Anderson So I guess for each Employee and each month you want a flag to indicate if the employee met your points above. To do this you would need 3 columns per month, 1st for the variance, 2nd for the flag to indicate invoice > 0 and payroll deduction = 0 and the 3rd to indicate payroll deduction > 0 and invoice = 0. Is a result set like this what you are looking to achieve?
Feb 19, 2015 at 22:57 comment added Steve Mangiameli Assuming you want it all in one query, you may want to use OUTER joins on those tables. You could also try a UNION to see if that meets your needs. A CASE will evaluate a condition and give you a value based on the condition...doesn't sound like what you are wanting. It sounds like you are wanting to combine datasets with different conditions.
Feb 19, 2015 at 22:26 comment added LowlyDBA - John M It helps to post the schemas of tables involved.
Feb 19, 2015 at 21:32 history asked Corey CC BY-SA 3.0