|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
selecting the last record with these conditions
If for example I have this table with A and B as columns
A B 20 Ye 12 No 20 Pw 30 Ye 20 Ud 20 Rd A: not unique B: not unique How can I select the last record |
|
#2
|
|||
|
|||
|
You can't as long as there is nothing on which you could sort the records. With only these two columns the result will never be sure
|
|
#3
|
|||
|
|||
|
I don't think so, there must be a way...
|
|
#4
|
|||
|
|||
|
Well, you may always try rs.MoveLast if that is what you need
|
|
#5
|
|||
|
|||
|
"rs.MoveLast???" sorry, i do not know about it could you explain to me further
|
|
#6
|
|||
|
|||
|
When you open a recordset using ADO (Microsoft) then you may use the method "MoveLast" in order to jump to the last record in a recordset.
There is nothing like that in pure SQL unless you use a cursor. Using cursors allows you to do the same things s you would do in an ADO recordset. See the doc that came with your database to see how to create and use cursors. Martin |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > selecting the last record with these conditions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|