I have 2 problem about order by and date compare ??
1. I have two column OrderDate date and OrderCode varchar(5)
the problem is if I use "select OrderCode,OrderDate from MyTable order by OrderCode,OrderDate" the result come with error order it does not display in correct order in serie of OrderDate but when I change OrderCode varchar(5) to OrderCode varchar(5) binary I mean I change to be binary type of varchar and then run the same query the result is correct it seem to use binary rather than not binary what is the mistake I do ??
2. With column date that use within index if I use "explain select OrderCode,OrderDate from MyTable where OrderDate < somedate" the reult say it will use index to do this but if I use "explain select OrderCode,OrderDate from MyTable where OrderDate > somedate" the result said no index use it will scan from ALL record what is the mistake I do ?? I mean <, <= , = it OK but for > it not OK.
Both of my problem base on version 4.0.15
Thanks. Kittiphum Worachat,M.T.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]