Предполагая, что SQL Server 2012 или выше, вы можете использовать оконную функцию first_value
:
SELECT FIRST_VALUE(Stand) OVER(ORDER BY Datum DESC)
FROM TableName
WHERE Id = @Id
Это вернет значение Stand
, где столбец Datum
имеет последнее значение для конкретного Id
.
Apparently you're able to send it WM_RBUTTONDOWN/UP
messages and it responds. If so, can you also send WM_KEYDOWN/UP
messages? As long as you know the structure of the menu and it doesn't change, try telling the app that someone's pressing the Down arrow X number of times and then hitting ENTER. That seems like the simplest solution to me...