Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

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

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
mphillip85
Asked:
mphillip85
  • 2
1 Solution
 
tiagosalgadoCommented:
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
 
tiagosalgadoCommented:
Sorry, remove the last ")".
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now