t;> "0" then " CategoryID like ''" + @a_strCategoryID + "%'' and "
else ""
end
/*根据调用位置决定sql的条件部分*/
select @m_strSqlCondition
= case
when @a_intPosition = 4 --商品
then "(ProductName like ''%" + @a_strParseWord + "%''"
+ " or Description like ''%" + @a_strParseWord + "%''"
+ " or ProducerName like ''%" + @a_strParseWord + "%'') "
when @a_intPosition = 5 --商业机会
then "(Title like ''%" + @a_strParseWord + "%''"
+ " or Keyword like ''%" + @a_strParseWord + "%'') "
when @a_intPosition = 6
then "(CompanyName like ''%" + @a_strParseWord + "%''"
+ " or Description ''%" + @a_strParseWord + "%'') "
end
set rowcount @a_intRowCount
exec (@m_strSqlSelect + @m_strSqlCategory + @m_strSqlCondition)
set rowcount 0
go