locutus
03-25-2002, 06:17 AM
hi, i know this is stupid of me but how can i select the data in the last row of one table and then search another table for that value? in one smooth operation / query
cheers for any help
cheers for any help
|
View Full Version : last row locutus 03-25-2002, 06:17 AM hi, i know this is stupid of me but how can i select the data in the last row of one table and then search another table for that value? in one smooth operation / query cheers for any help Pat Hartman 03-25-2002, 07:17 AM Physical order has no meaning in relational tables. There is no way to select the last physical row of a table. If what you actually mean is the "most recently entered" row, then you can retrieve it by using the Max() function for the id field if it is a sequentially assigned autonumber. Select * From YourTable1 Where YourTable1.Id = (Select Max(Id) From YourTable2); locutus 03-25-2002, 07:28 AM will give it a try, cheers mate |