Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Friday, October 18, 2024

SQL _ Update statement using selection of same table or different table

 Hi,

update TableA

set TableA.Image  = TableB.Image from ( select Image from TableA where dataAreaid = 'USMF' and imagetype = 1) as TableB
where dataAreaid = 'USF1' and imagetype = 1

Regards,

 

No comments:

Post a Comment

Get a table ID in SQL - D365

Hi select ID from SysTableIdView where  SysTableIdView .Name = 'CustTable' Regards,