How can I print the rows updated by this query in this query:
update
Table1.RecommendationLeg
set
actualValue = ( leg.actualprice * str.currentSize)
from
Table1.RecommendationLeg leg
inner join Recommendation str
on leg.partofId = str.id
where
leg.actualValue = 0
and datediff( n, timeOf, CURRENT_TIMESTAMP) > 30
update
Table1.RecommendationLeg
set
actualValue = ( leg.actualprice * str.currentSize)
OUTPUT INSERTED.actualValue -- <-- this. Edit, after SET not UPDATE. Oops. Sorry.
from
Table1.RecommendationLeg leg
inner join Recommendation str
on leg.partofId = str.id
where
leg.actualValue = 0
and datediff( n, timeOf, CURRENT_TIMESTAMP) > 30
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With