Alan,

You could limit your result set by telling the database to only return 
distinct Products.ItemID :

SELECT distinct(Products.ItemID), ...

Kevin

At 06:57 AM 4/12/01 -1000, you wrote:
>I would like to refine my sql searches down.  From the following sql 
>statement I am recieving up to 12 returns of the same record.  How can I 
>make this so that there is only 1 return for each record?
>  <cfquery datasource="#datasource#" name="prodpage">
>  SELECT      Products.ItemID,
>     Products.SKU, Products.ItemName,
>     Products.CategoryID,
>     Products.SubCatID,
>     Products.S_Description,
>     Products.Description,
>     Products.Price,
>     Products.Weight,
>     Products.A1,
>     Products.A1Vals,
>     Products.A2,
>     Products.A2Vals,
>     Products.Units,
>     Products.Layout,
>     Products.Key_Word,
>     ProdPics.PicID,
>     ProdPics.ItemPic,
>     ProdPics.ItemPicLB,
>     ProdPics.ItemPicF,
>     ProdPics.ItemPicB
>  FROM        Products, ProdPics
>  WHERE       Products.ItemID = ProdPics.PicID
>  AND   Description LIKE '%#form.keyword#%'
>  OR    ItemName LIKE '%#form.keyword#%'
>  AND   ItemID > 1
>  ORDER BY ItemName
>  </cfquery>
>
>TIA

-----
Kevin Ward
Web Programmer
Lattice Semiconductor Corporation
5555 NE Moore Court
Hillsboro, OR 97124-6421
Ph: 503.268.8656
Fx: 503.268.8693
[EMAIL PROTECTED]
http://www.latticesemi.com/


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to