RE: case expression

2003-02-24 Thread Richard Forgo
1 PM > To: Richard Forgo; MySQL Mailing List > Subject: RE: case expression > > Consider the CASE statement to be a function, that can only return values. > Aliases would go outside the CASE STATEMENT, as follows: > > SELECT > CASE > WHEN CHARACTER_LENGTH(system)

RE: case expression

2003-02-24 Thread Jon Wagoner
h_year, id FROM wsh -Original Message- From: Richard Forgo [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 3:44 PM To: Jon Wagoner; 'MySQL Mailing List' Subject: RE: case expression Thanks, that works fine. If I wanted to create an alias for the column, how woul

RE: case expression

2003-02-24 Thread Richard Forgo
e- > From: Jon Wagoner [mailto:[EMAIL PROTECTED] > Sent: Monday, February 24, 2003 4:34 PM > To: Richard Forgo; MySQL Mailing List > Subject: RE: case expression > > Put the other fields after the CASE statement: > > SELECT > CASE > WHEN CHARACTER_LENGT

RE: case expression

2003-02-24 Thread Jon Wagoner
From: Richard Forgo [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 3:21 PM To: 'MySQL Mailing List' Subject: case expression Hello all ... be gentle, I'm new at this: I've got a simple case query. One works (the top one), but when I try to add additional columns to t

case expression

2003-02-24 Thread Richard Forgo
Hello all ... be gentle, I'm new at this: I've got a simple case query. One works (the top one), but when I try to add additional columns to the query it fails. I reckon it's a pretty simple mistake I'm making, but I don't know what. Any help is appreciated. ---

re: Bug with CASE expression in Update statement

2002-12-23 Thread Victoria Reznichenko
On Monday 23 December 2002 17:54, Robert Berman wrote: > SELECT Company_ID, > COUNT(*) > FROM Eric > GROUP BY Company_ID; > ++--+ > | Company_ID | COUNT(*) | > ++--+ > | NULL | 10 | > ++--+ 1 row in set (

Bug with CASE expression in Update statement

2002-12-23 Thread Robert Berman
SEND-PR: -*- send-pr -*- SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as SEND-PR: will all comments (text enclosed in `<' and `>'). SEND-PR: From: root To: [EMAIL PROTECTED] Subject: Bug with CASE expression in Update statement >Descri

Sum of a CASE Expression

2001-03-08 Thread Phil Daintree
I can't see how CASE works ?? Manual is fairly breif on the subject. The SQL below has some kind of snag. Is this getting too hairy to use CASE within a sum expression ?? Any thoughts or comments would be appreciated. SELECT Sum(DebtorTrans.OvAmount + DebtorTrans.OvGST + DebtorTrans.OvFreight