UPPER & LOWER don't work in UDF

This is a discussion on UPPER & LOWER don't work in UDF within the MySQL Database forums, part of the Database Forums category; Hello, I had a pretty decent Google for this, so apologies if this has been answered many times before. I ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-12-2007
pandpp
 
Posts: n/a
Default UPPER & LOWER don't work in UDF

Hello,

I had a pretty decent Google for this, so apologies if this has been
answered many times before.

I am trying to make a UDF to change case.

What troubles me though is that I can't seem to get either LOWER or
UPPER to change the case, when it's called inside a UDF.

If the UPPER or LOWER is called outside, it works brilliantly, as
expected.

I got desperate in the end & took the doco example, as detailed below:
CREATE FUNCTION hello (s CHAR(20)) RETURNS CHAR(50)
RETURN CONCAT('Hello, ', UPPER(s), '!');

When I call this function as detailed in the doco (SELECT
hello('world')), I would expect:
Hello, WORLD!

I don't, I get plain old:
Hello, world!

I'm running MySQL 5.0.17 through Uniform Server.

I've tried everything I can think of, so be interested in what
suggestions people have to offer.

Thanks,
Peter.

Reply With Quote
  #2 (permalink)  
Old 01-12-2007
Felix Geerinckx
 
Posts: n/a
Default Re: UPPER & LOWER don't work in UDF

"pandpp" <tipping.homeschool@gmail.com> wrote in
news:1168561093.951362.110370@51g2000cwl.googlegro ups.com:

> What troubles me though is that I can't seem to get either LOWER or
> UPPER to change the case, when it's called inside a UDF.


http://bugs.mysql.com/bug.php?id=12903

--
felix
Reply With Quote
  #3 (permalink)  
Old 01-12-2007
pandpp
 
Posts: n/a
Default Re: UPPER & LOWER don't work in UDF

Thanks Felix, absolutely perfect.

Peter.


Felix Geerinckx wrote:
> "pandpp" <tipping.homeschool@gmail.com> wrote in
> news:1168561093.951362.110370@51g2000cwl.googlegro ups.com:
>
> > What troubles me though is that I can't seem to get either LOWER or
> > UPPER to change the case, when it's called inside a UDF.

>
> http://bugs.mysql.com/bug.php?id=12903
>
> --
> felix


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:20 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0