Click here to Skip to main content
15,921,062 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
guys can you help to figure out what code should i use by merging a data in one table in sql server procedure this is the scenario

ID | Name | Address | Status | Date
1 | AJ | New Jersey | GOOD | jun 9 2013
2 | AJ | New Jersey | EXCELLENT | jun 10 2013



my question is how can i merge the data though the id is unique but as status is change so i expect the new data will be viewed but im having also a problem with this

Number of applicant | Name
1 | AJ
2 | AJ

which i expect it to be one as it will happen to this illustration will be


Number of applicant | Name
1 | AJ


thanks in advance
Posted

1 solution

Sounds like your table design isn't quite up to scratch.

Perhaps you need one table like this:

ApplicantID, Name, Address...

And another table like this:

ApplicantStatusID, ApplicantID, Status, Date

Then you could get the latest status date from the second table and link it to the details record in the first table.
 
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