Solved

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

Posted on 2008-10-13
2
160 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
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.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

789 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