Re: problem with coalesce function

2006-04-24 Thread Martijn Tonies
Hello Pedro, >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; Although it sounds silly, remove the space between COALESCE and the "(" That should do the trick. Martijn T

RE: problem with coalesce function

2006-04-24 Thread Pedro Verissimo
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)" <[EMAIL PROTECTED]>: > Hi Pedro, > > What version of MySQL are you running?

RE: problem with coalesce function

2006-04-24 Thread Logan, David (SST - Adelaide)
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

Re: problem with coalesce function

2006-04-24 Thread Martijn Tonies
>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 Sure: use functions that exist. Now, if you want a better answer, try asking a better question. Showing us the code, for example, wou