October 31, 2014 at 3:20 pm
I have a table that contains studentid, program_cmnt, comment_dt
A student can apply to either SH or HN initially and later can change program from SH to HN or vice versa.
Whenever a student changes the program for SH to HN, 2 additional records with Program_cmnt "SH_WD" and "HN" gets added with comment_dt and for that student_id that shows withdrawn from SH and applied HN.
If a student withdraws from a program and does not choose other program, then just withdrawn comment for that program gets added. (ex applied to HN and withdrawn :Program_cmnt=”HN” withdrawn "HN_WD" )
I need to select only those students who applied for either SH or HN and did not withdraw finally.
So basically I need to select students where last comment is not withdrawn( select all students with SH or HN comment last and exclude those with SH_WD or SH_WD exist last)
I am unable to sort by date as when they change program from SH to HN or vice versa, the same date gets added for withdrawn comment (SH_WD or HN_WD)
How can I do that.
Thanks,
Blyzzard
Viewing 0 posts
You must be logged in to reply to this topic. Login to reply