×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: SQL
Posted by: Jacob Mahto
Added: Apr 15, 2018 6:22 PM
Modified: Apr 15, 2018 7:26 PM
Views: 3
Tags: no tags
  1. SET @a:=0;SELECT @a:=@a+1 sr , ch_info_gen.ch_no,date_in,mat_name,mat_ni,mat_ki,mat_mi,job_worker,job_addr,nature,ch_no_return,date_fi,mat_nf,mat_kf,mat_mf,(mat_ni-mat_nf) AS 'diff_n',(mat_ki-mat_kf) AS 'diff_k',(mat_mi-mat_mf) AS 'diff_m' FROM ch_info_gen,ch_mat,job WHERE ch_info_gen.ch_no=ch_mat.ch_no AND ch_info_gen.job_id=job.id;