Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query get previous name

Status
Not open for further replies.

wudang26

Technical User
May 18, 2012
7
0
0
US
I have this query that gets a name based on the a begin date in my table <= sysdate and then the end date.

I get one value from the name field when I do this. I would like to get the previous record
So there would be 2 values in the results. Any help would be appreciated.

name2 - previous record
name1


select name
FROM ps_name_tbl
WHERE (begin_dt <= sysdate) and (end_dt >= sysdate) and (career = 'Program')
GROUP BY name, career, begin_dt, end date
ORDER BY name
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top