I am trying to use the keyword CONTAINS in a query and I need to search for two seperate words in two different columns.
Can I do that?
The query below does not seem to work. I know its difficult to test this without data but can anybody make out anything wrong in the syntax off-hand. (I know it is wrong somewhere)
SELECT cpi.*, s.name as SupplierName, cpd.ShortDesc, Mfr.Name as MfrName, cp.UnitPrice as DisplayUnitPrice
FROM Cat_PartDesc cpd, Cat_PartInfo cpi, Cat_ProductCatalog cpc,
supplier s, Mfr , Cat_Price cp
WHERE ((CONTAINS(cpd.LongDesc, 'FORMSOF (INFLECTIONAL, copper) and FORMSOF (INFLECTIONAL, wire)))) OR CONTAINS(cpd.ItemDetail, 'FORMSOF (INFLECTIONAL, copper) and FORMSOF (INFLECTIONAL, wire))') and cpd.PartId = cpi.PartId and cpi.ProductCatalogID = cpc.ProductCatalogID and Mfr.MfrId = cpi.MfrId and cp.PartId = cpd.PartId and cp.isCurrent = 1 and cp.Status = 0 and cp.IsSearchable = 1 and cpi.IsObsolete = 0 and s.supplierid = cpc.supplierid and s.name = 'WESCO Distribution, Inc.'
Thanks
Can I do that?
The query below does not seem to work. I know its difficult to test this without data but can anybody make out anything wrong in the syntax off-hand. (I know it is wrong somewhere)
SELECT cpi.*, s.name as SupplierName, cpd.ShortDesc, Mfr.Name as MfrName, cp.UnitPrice as DisplayUnitPrice
FROM Cat_PartDesc cpd, Cat_PartInfo cpi, Cat_ProductCatalog cpc,
supplier s, Mfr , Cat_Price cp
WHERE ((CONTAINS(cpd.LongDesc, 'FORMSOF (INFLECTIONAL, copper) and FORMSOF (INFLECTIONAL, wire)))) OR CONTAINS(cpd.ItemDetail, 'FORMSOF (INFLECTIONAL, copper) and FORMSOF (INFLECTIONAL, wire))') and cpd.PartId = cpi.PartId and cpi.ProductCatalogID = cpc.ProductCatalogID and Mfr.MfrId = cpi.MfrId and cp.PartId = cpd.PartId and cp.isCurrent = 1 and cp.Status = 0 and cp.IsSearchable = 1 and cpi.IsObsolete = 0 and s.supplierid = cpc.supplierid and s.name = 'WESCO Distribution, Inc.'
Thanks