Home > SQL Development > displaying last 3 records

displaying last 3 records



Originally posted by : andrew (harrison@tiscalinet.it)id like to dispaly on a page the last 3 records to be inserted in a database.how do i do this?thanks for the help

    
Guest


Originally posted by : yuriy (yreznik@americanchiro.com)------------andrew at 10/1/2001 4:29:31 AMid like to dispaly on a page the last 3 records to be inserted in a database.how do i do this?thanks for the help-------------You can use Do while...recordcount=recordcount-1...Loop and check if Recordcount=3 start displaying the last 3 records or use GetRows method to put all recordset in an array and grab the last 3 records from the array.HTH,Yuriy

Was this answer helpful ? Yes No   
Guest


Originally posted by : Select TOP 3(*) from table_name ORDER BY ID DESC------------yuriy at 10/2/2001 8:32:49 AM------------andrew at 10/1/2001 4:29:31 AMid like to dispaly on a page the last 3 records to be inserted in a database.how do i do this?thanks for the help-------------You can use Do while...recordcount=recordcount-1...Loop and check if Recordcount=3 start displaying the last 3 records or use GetRows method to put all recordset in an array and grab the last 3 records from the array.HTH,Yuriy

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved