If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Max() date with union

Reply
 
LinkBack Thread Tools Display Modes
  #16 (permalink)  
Old 03-12-10, 13:31
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
I misread your SQL - it is more wrong than I thought. Let's speed things up:
Code:
...
(SELECT MAX(T.ACTUAL_DATE) FROM REVIEW T WHERE T.EMPLOYEE  = 
REVIEW_14.EMPLOYEE AND T.CODE = REVIEW_14.CODE)
Reply With Quote
  #17 (permalink)  
Old 03-12-10, 13:42
subserved subserved is offline
Registered User
 
Join Date: Oct 2009
Posts: 16
Ahh, add the primary key columns. That make sense. I am getting the latest date under the summative column now and all the others are showing up correctly.
Reply With Quote
  #18 (permalink)  
Old 03-12-10, 13:58
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
I'll cancel the bug report to Microsoft
Reply With Quote
  #19 (permalink)  
Old 03-12-10, 14:09
subserved subserved is offline
Registered User
 
Join Date: Oct 2009
Posts: 16
LOL! Thanks for helping me out, I really appreciate it.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On