-
Hello
I have next problem.
I have table EMP with columns
deptno number(3)
empno number(3)
dhire date
In this table I have for example 1000 rows.
I need to write cursor which will retrieve one row per deptno, if I have many rows with the same deptno than I need the latest one (max(dhire)).
For example if I have
deptno empno dhire
1 11 1.1.2000
1 12 1.2.2000
2 21 2.1.2000
3 31 3.1.2000
3 32 2.1.2000
then I need next rows:
deptno empno dhire
1 12 1.2.2000
2 21 2.1.2000
3 31 3.1.2000
If anyone has idea...
Help in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|