Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 T-SQL question

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-04-12 : 08:32:02
Jay writes "Hi, there
I have a question for U.
Here is table column's example and type..

EMPLID   EFFECTIVE DATE
000001 2000-11-13 00:00:00.000
000001 2001-04-13 00:00:00.000
000002 2000-11-13 00:00:00.000
000003 2000-11-13 00:00:00.000
000004 2000-11-13 00:00:00.000
000004 2001-04-13 00:00:00.000


What I want pull the data is like this..
If employee has a one row, just pull that row.
If employee has a more than one row, pull the row that has lastest effective date...

Thanks in advance..
Jay"
   

- Advertisement -