We are using Microsoft SQL Server 2008 R2 for one of our Classic ASP applications.
We have two tables:
- TableA
- TableB
TableA
has the following columns:
InstName(varchar[1024])
TableB
has these columns:
InstitutionName(varchar[1024])
However, we came across some data like the following
TableA
InstName
with value University of Nantes [ Universites de Nantes ]
TableB
InstitutionName
with value University of Nantes [ Universites de Nantes ]
We need to run inner join select queries on the said 2 tables:
select *
from TableA
inner join TableB on TableA.InstName LIKE TableB.InstitutionName
Sadly, this inner join fails to match the columns with the value of University of Nantes [ Universites de Nantes ]
I do know that "[]" square brackets have special meaning in Microsoft SQL Server 2008 R2.
Please modify the said inner join select query in such a way that it escapes the "[]" square brackets so that the match is found, and paste the said modified query on this stackoverflow.com ticket.
Furthermore, please advise on how I should deal with other special characters like "[]" square brackets that have special meaning in Microsoft SQL Server 2008 R2.