Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 4729

nned help on special characters to search a profile

$
0
0

Hello everyone

We have a live requirement of allowing email address with two dots (for example:-jamilfarhan@Hotmail.co.uk) to be added in our system. For testing purpose our front end developer have added email address in our DB which is

[gar]?m!c#a$p%r&o*f'e=s+s/i\o`n^a"l~|@mailinator.com

But when I am trying to search it from our application to search profile with this email address it doesn't work. I am getting blank.No error from SP.

The SP is returning this SQL statement

   Select top 300
            a.[customer_profile_id],
            [customer_id],
            [birth_date],
            [first_name],
            [last_name],
            [store_name],
            b.[country_id],
            [address_line_1],
            [address_line_2],
            [address_line_3],
            [city_name],
            [zip_code_base],
            [email_address],
            [home_telephone],
            [mobile_telephone],
            [card_profile_id],
            [card_number],
            [card_created_datetime],
            [card_updated_datetime],
            [replacement_card_datetime],
            a.[Loyalty_program],
   c.[is_invalid]
      FROM           
        customer_profile AS a WITH (NoLock)
      INNER JOIN
        customer_address AS b WITH (NoLock) ON
        a.customer_profile_id = b.customer_profile_id
      INNER JOIN
        card_profile AS c WITH (NoLock)
        ON a.customer_profile_id = c.customer_profile_id
  and (c.[is_invalid]=0 or c.[is_invalid] is null)
      INNER JOIN
        stores AS d ON a.preferred_store_id = d.store_id
      Where
        1 = 1 and email_address like N'[gar]?m!c#a$p%r&o*f''e=s+s/i\o`n^a"l~|@mailinator.com'

I think I can figure out that email address in the returning SP and the email address stored in the DB is different but I am not sure how can I proceed, so that when I search from the front end application< I can see the account in front end

Please advise. Not sure on how to proceed

Regards

Farhan Jamil


Viewing all articles
Browse latest Browse all 4729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>