Wildcarding for email in SQL Server -


this sample email data in table

2.3|[johnnyappleseed@example.com] 

below query have been working on little while:

select * ws_transaction service_id = 'getusertokenlogin'         , service_id '%@%' 

what supposed give me data table, , make column service_id contain emails, johnnyappleseed email. there wild card out there sql delete useless stuff portrays emails, or have go in different way?

i tried email using percent signs, believe deleting before , after @ not want.

any appreciative

i think can substring email, said have email wrap in square brackets '[ ]', use substring()

declare @a varchar(max) set @a = '2.3|[johnnyappleseed@example.com]' select  substring(@a,charindex('[',@a)+1,(charindex(']',@a)-charindex('[',@a))-1); 

see demo


Comments