Is it possible for a query distinguish between 'London Bridge' and 'London Bridge'

Is it possible for a query distinguish between 'London Bridge' and 'London  Bridge'

There are two spaces between London and Bridge?
Mr_ShawAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Philip PinnellConnect With a Mentor Commented:
They are different and will be treated as different

Where field='London  Bridge' will not return where field is 'London Bridge'

Did you want to treeat them as the same?
0
 
Philip PinnellConnect With a Mentor Commented:
replace('london  bridge','  ',' ') = 'London Bridge'

replaces double space with single space. This does not address multiple spaces
0
 
Mr_ShawAuthor Commented:
the following WHERE clause returns the same data

WHERE      Location ='Asia'

WHERE       Location ='Asia                  '

The are treated the same.
0
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
Philip PinnellConnect With a Mentor Commented:
try this

select 'same'
where 'london bridge'='london     bridge'

select 'same'
where 'london bridge'='london bridge'

Not the same results

MS SQL 2005
0
 
Mr_ShawAuthor Commented:
True...

It is just the suffix white spaces

select 'same'
where 'london bridge'='london bridge    '

select 'same'
where 'london bridge'='london bridge'
0
 
Mr_ShawAuthor Commented:
thanks
0
 
Philip PinnellCommented:
thanks
0
All Courses

From novice to tech pro — start learning today.