พิมพ์
หมวด: แฟ้มบริการกึ่งสำรวจ
ฮิต: 317

/*

ทำวัคซีนexport_vaccine_codeJ11,J12.ให้แสดงหน้าบัญชี4

*/

SET @vcode1= 'LAJE1';

SET @vcode2 = 'LAJE2';

# --------------------------------

UPDATE person_vaccine AS p

SET p.vaccine_code = @vcode1

WHERE p.export_vaccine_code = 'J11';

# --------------------------------

UPDATE person_vaccine AS p

SET p.vaccine_code = @vcode2

WHERE p.export_vaccine_code = 'J12';

# --------------------------------

UPDATE epi_vaccine AS e

SET e.vaccine_code =@vcode1

WHERE e.export_vaccine_code = 'J11';

# --------------------------------

UPDATE epi_vaccine AS e

SET e.vaccine_code =@vcode2

WHERE e.export_vaccine_code = 'J12';

# --------------------------------

UPDATE vaccine_combination AS b

SET b.vaccine_code =@vcode1,b.vaccine_combine_code=@vcode1

WHERE b.vaccine_code='LAJE1' OR b.vaccine_code ='laje1' OR b.vaccine_code='J11';

# --------------------------------

UPDATE vaccine_combination AS b

SET b.vaccine_code =@vcode2,b.vaccine_combine_code=@vcode2

WHERE b.vaccine_code='LAJE2' OR b.vaccine_code ='laje2' OR b.vaccine_code='J12';

# --------------------------------

UPDATE provis_vcctype AS t

SET t.name = @vcode1

WHERE t.code ='J11' OR t.code = 'j11';

# --------------------------------

UPDATE provis_vcctype AS t

SET t.name = @vcode2

WHERE t.code ='J12' OR t.code = 'j12';

# --------------------------------

UPDATE provis_aptype AS a

SET a.name = @vcode1

WHERE a.code ='J11' OR a.code = 'j11';

# --------------------------------

UPDATE provis_aptype AS a

SET a.name = @vcode2

WHERE a.code ='J12' OR a.code = 'j12';

# --------------------------------