I have the following statement, It will not run giving me the following message
Msg 102 Level 15 State 1 Line 10
Incorrect syntax near ')'.
here is the code
set cxa_on_hold_flag = '1'
(select distinct a1.cxa_mailing_label, a1.cxa_adr_key, M.cxa_adr_key
from co_customer_x_address a1
(select a2.cxa_adr_key from co_customer_x_address a2
where a1.cxa_adr_key = a2.cxa_adr_key) M
Where a1.cxa_adr_key = '4490a7ff-cbfe-4386-8643-ec8cec854410')
If I run the Middle Select statement by it self it runs fine and returns the exact expected results but when I try to add the upate statemetn it doesn't work.
Anyone know what I am doing wrong and can guide or help be figure this out.