Best Seller Linux Reseller Hosting Including 35% Recurring Discount!
webtech1 - Yesterday, 11:21 PM
Best webhosting support and Server Management services with 24x7technicalsupport.net
Tecsys - Yesterday, 10:58 PM
HostChilly V3 WordPress Hosting Theme with WHMCS Integration
JennishFernandis - Yesterday, 03:32 AM
Guaranteed bandwidth,1Gbps or 10Gbps Unmetered VPS,DDoS Protection,Linux/Windows
maplogger - Yesterday, 12:32 AM
Recent Blog Entries
Recent Status Updates
The dwarf became male!
Last status I posted I said I would be active, could not have been more wrong!
edit word online
I created my first blog and first entry.
- Managed C++
- Visual Basic 4 / 5 / 6
- linked list
- hello world
How to implement LIFO and FIFO method
Posted 11 October 2007 - 08:18 AM
Posted 11 October 2007 - 03:46 PM
SELECT FIRST(ID) FROM myTable ORDER BY FIRST(ID);or
SELECT MIN(ID) FROM myTable;If your database requires a time/date stamp then the min and max functions on the time/date field would work. Like:
SELECT MIN(DateTimeField) FROM myTable;Note that the above SQL only returns the value of a single field.
Another way you could write the SQL to return more than just a single field is with the TOP function. To get the first record:
SELECT TOP 1 * FROM myTable ORDER BY ID;To get the last record:
SELECT TOP 1 * FROM myTable ORDER BY DateTimeField DESC;You could make two queries. One called GetFirstAsset and one call GetLastAsset, then execute these queries (Stored Procedures) from the Visual Basic code.
Posted 11 October 2007 - 03:50 PM