April 16, 2003 at 1:31 pm
Hi,
Iam doing 4 tables union and descending order by 2 fields.
Here is sample query
Select * from (
Select equipno,activitydate,activitytime from Table1
Union all
Select equipno,activitydate,activitytime from Table2
Union all
Select equipno,activitydate,activitytime from Table3
Union all
Select equipno,activitydate,activitytime from Table4
) as k Order by Activitydate,activitytime desc
But result is coming in Ascending order. If order by one field its giving correct result.
What is the problem.
Thanks
Vishal
April 16, 2003 at 1:38 pm
Run this.
Select * from (
Select equipno,activitydate,activitytime from Table1
Union all
Select equipno,activitydate,activitytime from Table2
Union all
Select equipno,activitydate,activitytime from Table3
Union all
Select equipno,activitydate,activitytime from Table4
) as k Order by Activitydate desc ,activitytime desc
April 17, 2003 at 5:32 pm
Thank you allen,
Its working
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply