All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
用sql存储过程实现前台标题变色_[SQL Server教程]

Writer: 归海一刀 Article type: Programming skills(编程技巧) Time: 2014/2/3 6:46:54 Browse times: 461 Comment times: 0

用sql存储过程实现前台标题变色_[SQL Server教程]


Head photo

Go homepage
Upload pictures
Write articles

用sql存储过程实现前台标题变色_[SQL Server教程] 源程序:

ALTER proc GetDataByNumCategory
(
@Carcategory nvarchar(50)
)
as
declare @sql nvarchar(1000)
declare @Num nvarchar(20)
set @Num=(select top 1 Keyword from TaoCarActive)
declare @Green nvarchar(100)
declare @Green1 nvarchar(100)
set @Green=''
set @Green1='
'

declare @Red nvarchar(100)
set @Red=''
declare @Red1 nvarchar(100)
set @Red1='
'


exec('select top '+@Num+'
ID,
case when Hits=0 then '''+@Green+'''+CarCard+'''+@Green1+'''
else '''+@Red+'''+CarCard+'''+@Red1+''' end as CarCard
from
TaoCarActive where Carcategory='''+@Carcategory+''' order by ID')






There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.