Don't you need a parenthesis in this?
left join offices
::>                             on properties.listing_office_mls_id =
::offices.mls_office_id
::>                        and properties.mls = offices.mls
::>                      where 1 = 1
::>                        and (properties.property_type = 'lots and land'
::>                         or properties.property_type = 'commercial'
::>                         or properties.property_type = 'multifamily'
::>                         or properties.property_type = 'residential')
::>
::>               group by properties.mls_number
::>               order by offices.display_order
----------------------------------
William Seiter
ColdFusion Web Developer / Consultant
http://william.seiter.com

 
Have you ever read a book that changed your life?
Go to: http://www.winninginthemargins.com
Use PassKey: GoldenGrove
You'll be glad you did.
 
 
::-----Original Message-----
::From: Rick Faircloth [mailto:[EMAIL PROTECTED]
::Sent: Friday, May 23, 2008 10:38 PM
::To: CF-Talk
::Subject: RE: How can I use conditional statements in this query?
::
::well, actually, the logic wasn't right.
::
::the "where" clause needed to be negative, as in "where 1 = 2"
::followed by "or" conditions for all the "properties.xxxxxxx = 'xxxxxxx'
::
::
::
::> -----Original Message-----
::> From: Rick Faircloth [mailto:[EMAIL PROTECTED]
::> Sent: Saturday, May 24, 2008 12:41 AM
::> To: CF-Talk
::> Subject: RE: How can I use conditional statements in this query?
::>
::> Ok... I got it...
::>
::> The "where" and "and" clauses have to come after the
::> last join, as in:


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306010
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to