navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Select Statement Help.....

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Select Statement Help.....
Page: [1]
 
Welby

 

Posts: 59
Joined: 11/12/2002
Status: offline

 
Select Statement Help..... - 11/27/2002 9:58:56   
Is there a way to write a select statement to pull the highest number of a column? Or the last column written?

When people post to the database - I have a field (ID) that increases by one. I want to display a confirmation page with :) this field (as well as the rest of the data they just posted) to them so they can make a note of the ID number for future reference. I looked at Spooky' s tutorials - and he has one for ACCESS, but it says it will NOT work with SQL (and of course that' s what I' m using).

Any help would be greatly appreciated

Thanks - Welby
rdouglass

 

Posts: 9279
From: Biddeford, ME USA
Status: offline

 
RE: Select Statement Help..... - 11/27/2002 10:27:04   
I think there may be a solution for you at the bottom of this thread....

EDIT: Sorry Welby; didn' t realize that was your post as well....:)

< Message edited by rdouglass -- 11/27/2002 12:25:51 PM >

(in reply to Welby)
Welby

 

Posts: 59
Joined: 11/12/2002
Status: offline

 
RE: Select Statement Help..... - 12/3/2002 9:58:49   
What I ended up doing is a DRW and using a custom query that states:

select * from <TABLENAME>
ORDER BY " <ID-COLUMN>" DESC


I then did the display results in a table and showing only 1 record (which happens to be the last one since it' s in descending order) This looks like it will serve the purpose. I never had any luck with the @@Identity command.


Welby

(in reply to Welby)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Select Statement Help.....
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts