该表的结构 “TestTable的” 是查询中的Lucene
ID INT主键
的productid INT
属性Id INT
值VARCHAR(250)
其中productid是产品的唯一标识, attributeid是产品属性的唯一标识,例如尺寸,质量,身高,颜色 和'值'是属性的值
我必须过滤结果。我通过这个查询来达到要求。 但我无法在查询中完成。
select a.* from dbo.testtable a
where a.attributeId=10 and a.[Value]='Romance'
and productId in
(
select productId
from
dbo.testtable where attributeId =7 and [Value]='Hindi'
)
需要帮助建立这个查询..
您无法使用lucene查询表格。你有这个数据的现有lucene索引吗? – skaffman 2009-06-16 07:22:13
是的..数据已经编入索引 – Shashi 2009-06-16 07:43:54