a guest Dec 19th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- @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
RAW Paste Data