I am trying to get the latest time that a table was refreshed in our database and then<br>
print all the information related to that table. The Group by clause keeps us from printing the whole row of data. Could someone help me get the whole row of data after I have found the row I want with a group by clause? I am using SQL Server 7.0 so if there is a way to do this with a stored procedure, please let me know. Thanks.<br>
Karen Suenram<br>
<br>
Select distinct tbl_nm, max(tbl_refresh_ts) <br>
from control_Log<br>
group by tbl_nm <br>
order by tbl_nm<br>
-------------------------------Query Result:<br>
tbl_nm tbl_refresh_ts<br>
Actuals_Detail Jan 5 2000 7:18AM <br>
Budget_Detail Feb 2 2000 7:30AM <br>
<br>
But when I am done I want the information for all 6 columns<br>
Report Needed: <br>
-------- <br>
tbl_nm - tbl_refresh_ts - project_nm - data_source_nm - refresher_id -data_asof_dt <br>
<br>
Actuals_Detail ....... <br>
Budget_Detail.......
print all the information related to that table. The Group by clause keeps us from printing the whole row of data. Could someone help me get the whole row of data after I have found the row I want with a group by clause? I am using SQL Server 7.0 so if there is a way to do this with a stored procedure, please let me know. Thanks.<br>
Karen Suenram<br>
<br>
Select distinct tbl_nm, max(tbl_refresh_ts) <br>
from control_Log<br>
group by tbl_nm <br>
order by tbl_nm<br>
-------------------------------Query Result:<br>
tbl_nm tbl_refresh_ts<br>
Actuals_Detail Jan 5 2000 7:18AM <br>
Budget_Detail Feb 2 2000 7:30AM <br>
<br>
But when I am done I want the information for all 6 columns<br>
Report Needed: <br>
-------- <br>
tbl_nm - tbl_refresh_ts - project_nm - data_source_nm - refresher_id -data_asof_dt <br>
<br>
Actuals_Detail ....... <br>
Budget_Detail.......