Guest User

Untitled

a guest
Dec 19th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. DECLARE
  2. @name NVARCHAR(100) = 'Brian',
  3. @mobile NVARCHAR(100) = '0219002315'
  4. SELECT cd.CustomerID FROM [dbo].[BDB_CustomerDetails] cd
  5. where (cd.MetaKey='First Name' AND cd.MetaValue=@name )
  6. or (cd.MetaKey='Mobile' AND cd.MetaValue=@mobile)
  7. group by cd.CustomerID
  8. having count(*) = 2
Add Comment
Please, Sign In to add comment