Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE
- @name NVARCHAR(100) = 'Brian',
- @mobile NVARCHAR(100) = '0219002315'
- SELECT cd.CustomerID FROM [dbo].[BDB_CustomerDetails] cd
- where (cd.MetaKey='First Name' AND cd.MetaValue=@name )
- or (cd.MetaKey='Mobile' AND cd.MetaValue=@mobile)
- group by cd.CustomerID
- having count(*) = 2
Add Comment
Please, Sign In to add comment