I have a field called LongNotes and I need to get the latest entry in that field. Here's my current query:
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:qConnectionString %>" SelectCommand="SELECT ACCOUNT.ACCOUNTID, HISTORY.STARTDATE, HISTORY.USERNAME, HISTORY.CONTACTNAME, HISTORY.LONGNOTES FROM ACCOUNT INNER JOIN HISTORY ON ACCOUNT.ACCOUNTID = HISTORY.ACCOUNTID WHERE (ACCOUNT.ACCOUNTID = @Param1)">
<asp:QueryStringParameter Name="Param1" QueryStringField="ACCOUNTID" />
I have to get the data this way so I don't want to mess anything up. I just need to somehow get the last entry in the HISTORY.LONGNOTES field.
Any ideas? TIA!