meinIT
asked on
ORDER BY Date not working in Views
Hello,
I am having a situation with the View treating the SQL statement below, when I run this statement, it orders all the records by date (oldest--newest), however when I make the View
with the same statement and run it, its ordering it rather by Product type name.
I am unable to figure this out.
I want it to show the results order by date.
Please can someone advise?
Thanks for any help.
Regards
M
I am having a situation with the View treating the SQL statement below, when I run this statement, it orders all the records by date (oldest--newest), however when I make the View
with the same statement and run it, its ordering it rather by Product type name.
I am unable to figure this out.
I want it to show the results order by date.
Please can someone advise?
Thanks for any help.
Regards
M
Post the select satatment
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks all.
i have a slight problem, the order is still seems not to be correct...
have used the following statement
SELECT * FROM viewWeeklyWebOrdersReport ORDER BY DAY DESC,MONTH DESC,YEAR DESC
attached is what i have got
i have a slight problem, the order is still seems not to be correct...
have used the following statement
SELECT * FROM viewWeeklyWebOrdersReport ORDER BY DAY DESC,MONTH DESC,YEAR DESC
attached is what i have got
31 3 2009
30 3 2009
30 3 2009
30 3 2009
30 3 2009
28 3 2009
28 3 2009
27 3 2009
26 3 2009
26 3 2009
26 3 2009
26 3 2009
26 3 2009
26 3 2009
26 3 2009
1 4 2009
this should rather would have been starting from 26 ..and ending to 1st april
please can you still advise?
your new select statement will first desc day than month then year, so return result as you show
I think your statement like
Year, Month than Day
SELECT * FROM viewWeeklyWebOrdersReport ORDER BY YEAR DESC, MONTH DESC, DAY DESC
I think your statement like
Year, Month than Day
SELECT * FROM viewWeeklyWebOrdersReport ORDER BY YEAR DESC, MONTH DESC, DAY DESC
ASKER
thanks
m
Open in new window