troubleshooting Question

Query Question

Avatar of minglelinch
minglelinch asked on
Microsoft SQL Server 2005
6 Comments1 Solution267 ViewsLast Modified:
I have the following query -

update dbo.AllData$ t1
set t1.Con = (
select t2.Con
from dbo.AllData$ t2
where t2.Log<121 and t2.Loc=t1.Loc
)
where t1.Loc=t2.Loc
t1.Log > 120

But I got error:

Incorrect syntax near 't1'.
Msg 156, Level 15, State 1, Line 7
Incorrect syntax near the keyword 'where'.

I cannot locate where the problem is. I appreciate any help.
ASKER CERTIFIED SOLUTION
Ioannis Paraskevopoulos

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 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 6 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