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.
| Author |
Topic |
|
nuruddean
Starting Member
11 Posts |
Posted - 2010-05-07 : 02:40:05
|
| I've run this scriptselect person_id, gd.segment4||gd.segment5 ,effective_start_datefrom per_all_assignments_f paf,per_grades gr, per_grade_definitions gdwhere paf.GRADE_ID = gr.grade_idand gr.grade_definition_id = gd.grade_definition_idand person_id = 1799group by person_id,gd.segment4||gd.segment5,effective_start_dateand the output is PERSON_ID GD.SEGMENT4||GD.SEGMENT5 EFFECTIVE_START_DATE1799 DS45 10/2/19891799 DS45 1/8/20071799 DS45 6/1/20071799 DS45 6/1/20081799 DS52 11/13/20081799 DS52 1/1/2010how i want to get the oldest date?My Name is Nuruddin |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-05-07 : 02:49:19
|
Maybe type in a DISTINCT after the SELECT and type min(effective_start_date) instead of effective_start_date No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-05-07 : 02:50:19
|
You are not using SQL Server. It is best that you post in an Oracle forum. You will get better answer there.We can only provide you the solution in SQL Server's T-SQL. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-05-07 : 05:13:52
|
| This site is for MS SQL ServerFor Oracle questions post at www.orafaq.comMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|