Solved

my updated command is not working in query on sql 2005 server

Posted on 2008-10-13
2
154 Views
Last Modified: 2012-05-05
Use Redwood_II

UPDATE c
   SET
      [DAXREF] = d.NewDAXREF
      ,[OldDAXREF] = d.OldDAXREF
 from BillingDataConsolidatedPayments as c

 WHERE exists (Select NewDAXREF,OldDAXREF FROM BillingDataConsolidateedPaymentsTempTableUpdate as d

where (c.DAXREF = d.OldDAXREF))


What do i need to do to change my syntax to work?

Thanks
0
Comment
Question by:mphillip85
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
tiagosalgado earned 500 total points
ID: 22701893
Try something like this.
UPDATE c 

   SET 

      [DAXREF] = d.NewDAXREF

      ,[OldDAXREF] = d.OldDAXREF 

 from BillingDataConsolidatedPayments as c

 inner join BillingDataConsolidateedPaymentsTempTableUpdate as d ON (c.DAXREF = d.OldDAXREF))

Open in new window

0
 
LVL 8

Expert Comment

by:tiagosalgado
ID: 22701897
Sorry, remove the last ")".
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

759 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

23 Experts available now in Live!

Get 1:1 Help Now