SQL语句中把日期以短日期格式显示
select convert(char(8),getdate(),112)
查询语句中运行判断条件显示
select case v_yhdm when 'fwz' then '0'else v_yhdm end,v_xm from pt_login
--取某字段在某以逗号分隔的字符串中的记录
--select * from DictionaryClass where charindex(','+cast([id] as varchar)+',',','+'1,2'+',')>0
--取某字符串在某个以逗号分隔的字段中的记录
--select * from CurrentWord where id > 0 and charindex(',2,',','+cast(ClassID as varchar)+',')>0
select convert(char(8),getdate(),112)
查询语句中运行判断条件显示
select case v_yhdm when 'fwz' then '0'else v_yhdm end,v_xm from pt_login
--取某字段在某以逗号分隔的字符串中的记录
--select * from DictionaryClass where charindex(','+cast([id] as varchar)+',',','+'1,2'+',')>0
--取某字符串在某个以逗号分隔的字段中的记录
--select * from CurrentWord where id > 0 and charindex(',2,',','+cast(ClassID as varchar)+',')>0