sdm1 := getsqlstringdata('select b.hospmain from an_stat a, vn_stat b where a.an="'+DBPipeline['name2'] +'" '+
'and a.vn=b.vn and a.pttype not in("10","34","20","21","22") ');
sdm2 := getsqlstringdata('select chwpart from hospcode where hospcode="'+sdm1+'"');
value:= GetSQLStringData('select concat("Êӹѡ§Ò¹ÊÒ¸ÒÃ³ÊØ¢¨Ñ§ËÇÑ´ ",name) as dd from thaiaddress where chwpart="'+sdm2+'" and codetype="1"');