MySQL Forums
Forum List  »  General

Using Aliases in function
Posted by: scryo
Date: May 29, 2006 02:49AM

Hy,

I'm surprised that I can't use aliases in function !!!
I use MySQL 4.1.9 and this query (for example) doesn't function :

SELECT NAME n
FROM ENGINEER e
ORDER BY UPPER(n)

It's very strange and not cool. In fact, what is the real interest of aliases, except on joints ?!
I must use an aliase because I use it on a subquery which looks like this :
SELECT (SELECT f.NAME FROM FUNCTION f WHERE f.ID=e.FUNCTION) n
FROM ENGINEER e
ORDER BY UPPER(n)

and I won't put again a subquery in the ORDER clause.

And why MySQL didn't implement this function, however very useful ?

Thanks

(Sorry for my english, I'm not english)

Options: ReplyQuote


Subject
Written By
Posted
Using Aliases in function
May 29, 2006 02:49AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.