Click here to Skip to main content
15,915,975 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello

I want to select max date from the table using todate column. and i want to select this todate from last transaction happen.

Plz help.
Posted

there is two method which will solve your problem

SQL
select top 1 ToDate from UrTable order by ToDate desc
select max(ToDate) from UrTable
 
Share this answer
 
Comments
Prasad_Kulkarni 14-Jun-12 3:29am    
5'ed
Try This :

"SELECT fileds FROM tablename WHERE (date=(SELECT  MAX(date) FROM  tablenmae ))";



hope this will help you..
 
Share this answer
 
Comments
Prasad_Kulkarni 14-Jun-12 3:30am    
5'ed

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900