Query Max Values
2 TopicsCorrect the Code
Hello , Would you please correct the code as I am receiving the below error : select * from openquery(DRUPAL,'select o.* from (select max(vid), nid from content_type_irb_application_form group by nid) i inner join content_type_irb_application_form o on o.nid = i.nid and o.vid = i.vid') Msg 7321, Level 16, State 2, Line 1 An error occurred while preparing the query "select o.* from (select max(vid), nid from content_type_irb_application_form group by nid) i inner join content_type_irb_application_form o on o.nid = i.nid and o.vid = i.vid" for execution against OLE DB provider "MSDASQL" for linked server "DRUPAL".Solved1.2KViews0likes2CommentsAccess Query to Display Max Value
Hi, I'm trying to achieve the goal of displaying the data of my query to display a max value according to a main value. For example the query would look like this (with more entries and People); Person | Date | RunTime | TotalShoeRunTime Dave | Jan 1 | 3.00 | 15 Dave | Jan 5 | 3.00 | 18 John | Feb 4 | 5.00 | 20 John | Feb19 | 6.00 | 26 Nancy | Aug 23 | 7.00 | 30 Nancy | Aug 25 | 9.00 | 39 End Result I would like to see is the Three people and their max TotalShoeRunTime to be displayed. For example: Dave | Jan 5 | 3.00 | 15 John | Feb 19 | 6.00 | 26 Nancy | Aug 25 | 9.00 | 39 I look forward to any tips you would have and thank you for all the help! Thanks!1.7KViews0likes4Comments