จาก
if getsqldata('select depcode from kskdepartment where depcode in ("001","002","003","007","008","010","011","019","020","021","022", '+
' "027","028","029","039","045","050","054","055","056","057","058","067","068","074")
แบบสั้น ๆ
if getsqldata('select depcode from kskdepartment where depcode in (select depcode from depcode_vn_script_allow) '+
' and depcode="'+fdepartment+'"')=''+fdepartment+'' then