Solved

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

Posted on 2008-10-13
2
164 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
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.

751 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