Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display only one line or current data

Status
Not open for further replies.

jma

Technical User
Apr 24, 2001
74
US
I am trying to create a display page that will only display the most recent line in the database....a user will enter updated info frequently and on the display page just that most current info should show. I'm new to .asp so i'm not sure how to do that ...I'm using ultradev...
Thanks!
 
do you have an id or a date/time in your table (think an id would be best as theres no extra syntax you need)

in your select statement order desc by your id and select the top record.

think the sql is along the lines of

"select top 1 * from your_table order by table_ID"

daveJam
 
sorry, forgot to put the order type in there

"select top 1 * from your_table order by table_ID Desc"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top