sql 实现搜索框的一个实例

var condition =  $('#input_1').val();

string Sql = " Select a.applycode,b.name,a.compcode,a.dept,a.position,convert(char(10),a.hiredate,101) as hiredate ,convert(char(10),a.registerdate,101) as registerdate  from T_EmployeeHire a inner join t_empbaseinfo b on a.applycode=b.applycode  where (a.Applycode like @Condition + '%'  or b.name like @Condition + '%' ) and a.DimHired is null and a.badge is null and a.compcode=@CompCode and a.dept in (select distinct dept_code from asmuser.dbo.Department where dept_site=@Site)";

 

posted on 2021-08-31 17:04  yuanxin1991  阅读(110)  评论(0)    收藏  举报

导航