Hi,
I need to find a way to get the row containing highest sessionid number WITHOUT building an index like I'm doing here. It takes too long to run and I'm trying to improve performance. Thanks! Here is the code...
I need to find a way to get the row containing highest sessionid number WITHOUT building an index like I'm doing here. It takes too long to run and I'm trying to improve performance. Thanks! Here is the code...
Code:
Select 'rv_Session'
Index On SessionID Tag iSession
Set Order To iSession Desc
Go Top
Locate For Upper(Alltrim(rv_Session.SystemId)) == Upper(Alltrim(gcSystemId))
If Found('rv_Session')
gnSessionId = rv_Session.SessionID + 1
Else
gnSessionId = 1
Endif