troubleshooting Question

Error on linked server query

Avatar of running32
running32 asked on
Microsoft SQL ServerSQL
5 Comments1 Solution212 ViewsLast Modified:
update upload set strmatch = 1
where (name in (select BC-DENTRIX.dbo.ddb_pat_base.lastname from BC-DENTRIX.dbo.ddb_pat_base))
and (dob in (select BC-DENTRIX.dbo.ddb_pat_base.birthdate from BC-DENTRIX.dbo.ddb_pat_base))
and (lname in (select BC-DENTRIX.dbo.ddb_pat_base.firstname from BC-DENTRIX.dbo.ddb_pat_base))

I am trying to run the above query on a linked server but I am getting the message below.  I would be greatful for any help on how to resolve this.  Thank you
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near '-'.
Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near '-'.
Server: Msg 170, Level 15, State 1, Line 4
Line 4: Incorrect syntax near '-'.

ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros