แบบ นี้ป่าว ครับ
Value := GetSQLStringData('select drugallergy '
+' from patient pt'
+' where pt.hn="'+DBPipeline['hn']+'"')'
+' IF DBPipeline['drugallergy']='' THEN
+' Value :='ไม่แพ้ยา' Else
+' Value:= ReplaceStr( DBPipeline['drugallergy'],'''','');