update purchaseupdate t set t.gysname=(select distinct tf.gysname from jieusandetail tf where tf.cgno =t.cgno)