แวะมาดันซะหน่อย..ง
วาง variable
Value := GetSQLSubqueryData('select icd10 from iptdiag where an="'+DBPipeline['an']+'" and diagtype="2"');
memo1.lines.text:=GetListFromQuery('select name from icd101 where code in ('+
GetSQLSubqueryData('select icd10 from iptdiag where an="'+DBPipeline['an']+'" and diagtype="2"')+') ');
memo2.lines.text:=GetListFromQuery('select icd10 from iptdiag where an="'+DBPipeline['an']+'" and diagtype="2"');