Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have succeeded that by using merge ... how ever it will take much longer to complete the stored procedure but it will do as I want -></p> <pre><code>insert into pro_updatelog select * , @user_n, GETDATE() from (SELECT * FROM pro EXCEPT SELECT * FROM temp UNION ALL SELECT * FROM temp EXCEPT SELECT * FROM pro) as T1; merge pro_updatelog as tar using pro as sor on (tar.cod = sor.cod) when matched then update set tar.cod = sor.cod , tar.name_pr = sor.name_pr , tar.name_pe = sor.name_pe , tar.en = sor.en , tar.ending = sor.ending , tar.b = sor.b , tar.date_p = sor.date_p , tar.nek = sor.nek , tar.date_kh = sor.date_kh , tar.mp = sor.mp , tar.mt = sor.mt , tar.no_p = sor.no_p , tar.mas = sor.mas , tar.mablag = sor.mablag , tar.np = sor.np , tar.nf = sor.nf , tar.nn = sor.nn , tar.hpp1 = sor.hpp1 , tar.hpp2 = sor.hpp2 , tar.hpp3 = sor.hpp3 , tar.hpp4 = sor.hpp4 , tar.hpp5 = sor.hpp5 , tar.hpp6 = sor.hpp6 , tar.hpp7 = sor.hpp7 , tar.hpp8 = sor.hpp8 , tar.hpf1 = sor.hpf1 , tar.hpf2 = sor.hpf2 , tar.hpf3 = sor.hpf3 , tar.hpf4 = sor.hpf4 , tar.hpf5 = sor.hpf5 , tar.hpf6 = sor.hpf6 , tar.hpf7 = sor.hpf7 , tar.hpf8 = sor.hpf8 , tar.mola = sor.mola , tar.name1 = sor.name1 , tar.name2 = sor.name2 , tar.name3 = sor.name3 , tar.name4 = sor.name4 , tar.name5 = sor.name5 , tar.name6 = sor.name6 , tar.mab_t = sor.mab_t , tar.zarib1 = sor.zarib1 , tar.zarib2 = sor.zarib2 , tar.zarib3 = sor.zarib3 , tar.zarib4 = sor.zarib4 , tar.datet1 = sor.datet1 , tar.datet2 = sor.datet2 , tar.grup = sor.grup , tar.mablag1 = sor.mablag1 , tar.cod_g = sor.cod_g , tar.cod_m = sor.cod_m , tar.user_n = @user_n , tar.[date]=getdate(); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload