List:General Discussion« Previous MessageNext Message »
From:Pedro Verissimo Date:April 24 2006 11:20am
Subject:RE: problem with coalesce function
View as plain text  
MySQL version is 5.0.19. Runs in Win. XP pack 2. I put sql in command line and i
 try using jdbc.
The code:
SELECT mfn,COALESCE (user_id,0)
      		FROM hits WHERE mfn =1;

Citando "Logan, David (SST - Adelaide)" <David.Logan@stripped>:

> Hi Pedro,
>
> What version of MySQL are you running? From the manual
>
> COALESCE(value,...)
>
> Returns the first non-NULL value in the list, or NULL if there are no
> non-NULL values.
>
> mysql> SELECT COALESCE(NULL,1);
>         -> 1
> mysql> SELECT COALESCE(NULL,NULL,NULL);
>         -> NULL
>
> COALESCE() was added in MySQL 3.23.3.  <------------------
>
> Are you running at least that?
>
> Regards
>
>
> ---------------------------------------------------------------
> ********** _/     **********  David Logan
> *******   _/         *******  ITO Delivery Specialist - Database
> *****    _/            *****  Hewlett-Packard Australia Ltd
> ****    _/_/_/  _/_/_/  ****  E-Mail: david.logan@stripped
> ****   _/  _/  _/  _/   ****  Desk:   +618 8408 4273
> ****  _/  _/  _/_/_/    ****  Mobile: 0417 268 665
> *****        _/       ******
> ******      _/      ********  Postal: 148 Frome Street,
> ********   _/     **********          Adelaide SA 5001
>                                       Australia
> i    n    v    e    n    t
> ---------------------------------------------------------------
>
> -----Original Message-----
> From: pedroverissimo@stripped [mailto:pedroverissimo@stripped]
> Sent: Monday, 24 April 2006 7:47 PM
> To: mysql@stripped
> Subject: problem with coalesce function
>
> When I use coalesce function I receive this error:
>
> "FUNCTION sirius.coalesce does not exist". sirius is the name of db. Can
> someone
> help me with this error
>
> Thanks,
>
> Pedro
> ___________________________________________________________________
>
> O SAPO já está livre de vírus com a Panda Software, fique
> você também!
> Clique em: http://antivirus.sapo.pt
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>

___________________________________________________________________

O SAPO já está livre de vírus com a Panda Software, fique você
também!
Clique em: http://antivirus.sapo.pt

Thread
problem with coalesce functionpedroverissimo24 Apr
  • Re: problem with coalesce functionMartijn Tonies24 Apr
  • RE: problem with coalesce functionSST - Adelaide)24 Apr
    • RE: problem with coalesce functionPedro Verissimo24 Apr
    • Re: problem with coalesce functionMartijn Tonies24 Apr