Solved

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

Posted on 2011-02-25
7
336 Views
Last Modified: 2012-06-21
Is it possible for a query distinguish between 'London Bridge' and 'London  Bridge'

There are two spaces between London and Bridge?
0
Comment
Question by:Mr_Shaw
  • 4
  • 3
7 Comments
 
LVL 13

Accepted Solution

by:
Philip Pinnell earned 500 total points
ID: 34978135
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
 
LVL 13

Assisted Solution

by:Philip Pinnell
Philip Pinnell earned 500 total points
ID: 34978144
replace('london  bridge','  ',' ') = 'London Bridge'

replaces double space with single space. This does not address multiple spaces
0
 

Author Comment

by:Mr_Shaw
ID: 34978178
the following WHERE clause returns the same data

WHERE      Location ='Asia'

WHERE       Location ='Asia                  '

The are treated the same.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 13

Assisted Solution

by:Philip Pinnell
Philip Pinnell earned 500 total points
ID: 34978199
try this

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

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

Not the same results

MS SQL 2005
0
 

Author Comment

by:Mr_Shaw
ID: 34978231
True...

It is just the suffix white spaces

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

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

Author Closing Comment

by:Mr_Shaw
ID: 34978243
thanks
0
 
LVL 13

Expert Comment

by:Philip Pinnell
ID: 34978350
thanks
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
cannot connect to sqlserver 8 25
Help Required 2 29
SQL Server - Find Parent/Child relationship tree between numeric range. 7 39
SQL view 2 26
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now