Hmmmm....

Try this:

Select *
from products
where hidden = 1
        AND DIM <= 200
        AND (COLOR1 = 'gold' OR COLOR2 = 'gold')
        AND WKSTN >= 2

------------------------------------
Mark Warrick - Fusioneers.com
Personal Email: [EMAIL PROTECTED]
Business Email: [EMAIL PROTECTED]
Phone: 714-547-5386
Efax: 801-730-7289
Personal URL: http://www.warrick.net
Business URL: http://www.fusioneers.com
ICQ: 125160 / AIM: markwarric
==================================== 

> -----Original Message-----
> From: Chad Gray [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 21, 2001 10:33 AM
> To: CF-Talk
> Subject: SQL question
> 
> 
> Im wondering why this SQL statement would bring up results where DIM is 
> greater then 200?  I think it has something to do with the OR statement, 
> but i dont know why.
> 
> Select *
> from products
> where hidden = 1 AND
>       DIM <= 200 AND
>       COLOR1 = 'gold' OR
>       COLOR2 = 'gold' AND
>       WKSTN >= 2
> 
> 
> 
> Here is my Output:
> ProductID : 3
> Dim : 600
> Color1 : blue
> Color2 : gold
> WKSTN : 4
> 
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to