Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have develop the windows form with crystal report in visual studio 2010 , all i need to show is that i want display the only recent data entered on the
crystal report , at present all table records are showing . please help me out .
Posted

You can show recent data by datewise you can add one column in table "CREATED_ON" having DATETIME datatype.
SQL
SELECT * FROM TABLE_NAME ORDER BY CREATED_ON DESC

Or
You can set Parimary key with auto identity and retrive records by desc order
SQL
SELECT * FROM TABLE_NAME ORDER BY PRIMARY_COLUMN DESC
 
Share this answer
 
v2
Dear Nirav i tried the first solution but i am receiving an error in the sql server. and for the second solution i want to show recent data and also the only first row data that is entered recentlt not also the data i want to show .
 
Share this answer
 

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