Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

set query with exists

$
0
0

I m trying to set 5 rows in my table but all the row are effected with my query

update Payment
set payment.status = 'Captured' where exists( select * from Payment  p
join Invoice i
on p.invoice_id = i.invoice_id
join Customer c
on i.customer_id = c.customer_id
join dppreport d
on  c.first_name = d.firstname and c.last_name = d.[lastname ]
where p.date_draft_start = d.[Process Date] and c.first_name = 'aba' and c.last_name = 'dsd')

am i missing something ???



Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>