|
@@ -69,7 +69,7 @@ FROM u_mattress
|
|
|
u_mattress.deptid in ($$user_deptstr$$)
|
|
|
</when>
|
|
|
<when notnull="@arg_search">
|
|
|
- EXISTS (SELECT 1 FROM dbo.SC_SPLIT(@arg_search, ',') A WHERE A.Item <> '' AND (u_mattress.mattresscode LIKE '%'+LTRIM(RTRIM(A.Item))+'%' OR u_mattress.mattressrelcode like '%'+LTRIM(RTRIM(A.Item))+'%' OR u_mattress.mattressname like '%'+LTRIM(RTRIM(A.Item))+'%'))
|
|
|
+ EXISTS (SELECT 1 FROM dbo.SC_SPLIT(@arg_search, ',') A WHERE A.Item <> '' AND (u_mattress.mattresscode LIKE '%'+LTRIM(RTRIM(A.Item))+'%' OR u_mattress.mattressrelcode like '%'+LTRIM(RTRIM(A.Item))+'%' OR u_mattress.mattressname like '%'+LTRIM(RTRIM(A.Item))+'%')) OR EXISTS (SELECT 1 FROM u_mtrldef WHERE usermtrlmode LIKE '%' + @arg_search + '%')
|
|
|
</when>
|
|
|
<when notnull="@arg_erp_mtrlcode">
|
|
|
EXISTS (SELECT 1 FROM dbo.SC_SPLIT(@arg_erp_mtrlcode, ',') A WHERE A.Item <> '' AND (u_mattress.erp_mtrlcode LIKE '%'+LTRIM(RTRIM(A.Item))+'%'))
|