Yes, you are right, periods are not allowed, but I am still not getting a
successfully ORDER BY on the field. I tried remove the DATE_FORMAT()
function and everything worked fine. Am'I not allowed to alias function
returns?
----- Original Message -----
From: "Gerald L. Clark" <[EMAIL PROTECTED]>
To: "Dave Juntgen" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001 1:41 PM
Subject: Re: Order by using alias?
> Periods are not allowed in field names.
>
> Dave Juntgen wrote:
> >
> > Hello everyone, It seems as though I am unable to perform an order by
with a
> > DATETIME field when the column is named as an alias. For example...
> >
> > SELECT DATE_FORMAT(service_date,'%m-%d-%Y') AS 'Serv. Date' FROM
documents
> > ORDER by 'Serv. Date' DESC LIMIT 0,10;
> >
> > Can anyone give me an explanation?
> >
> > Thanks,
> > --Dave J.
> > ---------------
> > Dave W. Juntgen
[EMAIL PROTECTED]
> > Medical Informatics Engineering, Inc. http://www.mieweb.com/
> > 4101 W. Jefferson Blvd. Phone: 219-459-6270
> > Fort Wayne, IN 46804 Fax: 219-459-6271
> >
> > ---------------------------------------------------------------------
> > Before posting, please check:
> > http://www.mysql.com/manual.php (the manual)
> > http://lists.mysql.com/ (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php