Special character in MSSQL database name

Hi, I have a program that transfers data from certain tables in one database to identical tables in another database using the following query :
insert into destinationdb.dbo.table1
select * from sourcedb.dbo.table1

However a customer has a database called A&E and the statement fails due to the "&" character. Is there a way to modify the sql to overcome this?

Thanks in advance.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

Tony303Connect With a Mentor Commented:
Put the DB name in square brackets?

FROM [A&E].dbo.table1
All Courses

From novice to tech pro — start learning today.