[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

[Firebird] How to select, find result/row number and update a field using 1 query?

Asked by MerlaP83 in Interbase / Firebird Database, Delphi Database, SQL Query Syntax

I'm sorting a table by points (sports sim) and I would like to figure out how I can get the row/result number saved to a field called Position?

So, basically the first result would have its Position set to '1', the second result would have its position set to '2' etc..
1:
2:
3:
Lag.close;
Lag.sql.text := 'select Klubb, GP, W, L, D, PTS, GF, GA from Lag where division = ''NHL'' order by PTS DESC, W DESC, GF DESC, Klubb ASC';
Lag.Open;
[+][-]05/22/09 12:33 AM, ID: 24448470Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/14/09 06:33 PM, ID: 24625916Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/08/09 02:15 AM, ID: 25279908Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/06/09 12:57 AM, ID: 25502659Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625