?
Solved

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

Posted on 2008-10-13
2
Medium Priority
?
171 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 2000 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

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

719 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