[Fwd: Re: Where clause question]

2004-10-11 Thread Morten Egan
Sorry, mailed it in html format. Read answer below Original Message Subject:Re: Where clause question Date: Tue, 12 Oct 2004 00:00:12 +0200 From: Morten Egan <[EMAIL PROTECTED]> To: Ed Lazor <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Not kno

Re: Where clause question

2004-10-11 Thread Eamon Daly
- Original Message - From: "Ed Lazor" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 11, 2004 4:51 PM Subject: RE: Where clause question Interesting. I thought you could sort by aliases. Thanks Shawn. The easy answer was to just add the calculati

RE: Where clause question

2004-10-11 Thread Ed Lazor
Interesting. I thought you could sort by aliases. Thanks Shawn. The easy answer was to just add the calculation to the where section as well. But which approach is faster - "having" or the calculation? Ie. select ID, Title, MSRP, Price, round( ( (MSRP - Price) / MSRP) * 100) as discount from

Re: Where clause question

2004-10-11 Thread Eamon Daly
r HAVING. Eamon Daly - Original Message - From: <[EMAIL PROTECTED]> To: "Ed Lazor" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, October 11, 2004 3:51 PM Subject: Re: Where clause question Because

Re: Where clause question

2004-10-11 Thread SGreen
Because "discount" isn't one of: 1) a field on one of the tables your query is based on 2) a formula based on one or more of the fields from one or more of the tables your query is based on. What it is: an alias to the results of a function applied to 2 fields on one of your tables. Since the

Re: where clause question

2002-10-07 Thread Steve Edberg
Well, it depends on what exactly you mean by 'checking' Bfn1, Bfn2 and Bfn3, but you should be able to do something like this (assuming for this example that you want only want to return results where Bfn1/Bfn2/Bfn3 is equal to 99): select * from table_a as A, table_b as B where

Re: where clause question

2002-10-06 Thread Peter Goggin
This requires a similar function to Oracles decode. I do not know if MySQL provides such a function. Regards Peter Goggin - Original Message - From: "Alex Shi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 07, 2002 6:47 AM Subject: where clause question > Hi, > > I