Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 370
  • Last Modified:

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?
0
Mr_Shaw
Asked:
Mr_Shaw
  • 4
  • 3
3 Solutions
 
Atdhe NuhiuCommented:
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
 
Atdhe NuhiuCommented:
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
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

 
Atdhe NuhiuCommented:
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
 
Atdhe NuhiuCommented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now