如何在多列中搜索值。例如,如果我有列FirstName
,SecondName
,LastName
,Company
,并且我想使用单个输入搜索公司或人名。我试过这样的事情,但这不是很普遍。
DECLARE @Search NVARCHAR(50) = 'Michael Jordan'
RTRIM(( LTRIM(ISNULL(Company, '') + ISNULL(FName,'') + ISNULL(SName,'') + ISNULL(LName,'')) )) LIKE + '%' + ISNULL((RTRIM(LTRIM(@Search))), RTRIM(( LTRIM(ISNULL(Company, '') + ISNULL(FName,'') + ISNULL(SName,'') + ISNULL(LName,'')) ))) + '%'
答案 0 :(得分:0)
您需要使用<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="container wrap">
<div class="btn-group btn-toggle">
<button class="btn btn-lg btn-green">ON</button>
<button class="btn btn-lg btn-default active">OFF</button>
</div>
</div>
。例如:
OR