Hi,
The solution is very simple. In your first select statement, you are not ordering the based on the date, but in the Second query you are ordering by date, but when union the queries, you could not find the ordered rows. I suggest you to put order statement for the overall result set rather ordering individual queries.
try like below.
select A.topic, A.CreatedBy, A.approved_date, A.type, A.comment_desc, A.sl_type
from
(
select top 5 sd.sl_sub as topic,em.name as CreatedBy,sd.approved_date,'topic'as type ,'' as comment_desc ,sd.sl_type
from wockhardt_022.sl_details sd
inner join dbo.employee_mapping map on map.user_id=sd.created_by and effective_to_date is null
inner join employee_master em on map.employee_id=em.employee_id
where sd.div_code=@div_code
and sd.approved_flag=1
and sd.created_date < @last_date
union
select top 5 sd.sl_sub as topic,em.name as CreatedBy,sc.approve_date as approved_date,'comment' as type ,sc.comment_desc,sd.sl_type
from wockhardt_022.sl_comment sc
inner join sl_details sd on sd.sl_id=sc.sl_id
inner join dbo.employee_mapping map on map.user_id=sc.comment_by and effective_to_date is null
inner join dbo.employee_master em on em.employee_id=map.employee_id
where sd.div_code=@div_code
and sc.approve_flag=1
and sc.approve_date < @last_date
) as A
order by A.approved_date desc
hope it helps.