结合asp和存储过程做的搜索程序(8)
"select ID , Title ,'Description' = left(convert(varchar,content) , 100) "
+ " from BusinessChance where "
when @a_intPosition = 6 then --公司库
"select CompanyID , 'Title' = CompanyName , 'Description' =left(Description , 100) "
+ " from Company where "
end
/*根据分类ID决定sql的分类部分*/
select @m_strSqlCategory
= case
when @a_strCategoryID <> "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 + "%'"
内容版权声明:除非注明,否则皆为本站原创文章。