Click here to Skip to main content
15,903,033 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have tblCustomer table that contains 1000 records.
If i will distinct the records through custid field then it is showing me 650 records.

I have to retrieve 650 records from tblCustomer.
Here i have to find out latest record if the record has the duplicate as per the custid. Here is no any date fields.


plz give me the solution.

Bye
Posted
Updated 8-Nov-11 19:24pm
v2
Comments
[no name] 9-Nov-11 1:11am    
Asking for a solution without even attempting anything, or showing that you have, is just plain rude.

1 solution

You can find the last record by querying for the max primary key value. What have you tried?
 
Share this answer
 
Comments
purnananda behera 9-Nov-11 1:12am    
I don't have any primary key also.
[no name] 9-Nov-11 3:28am    
Then your database is very poorly constructed. Add a primary key.

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