SQLCode := ' set rowcount 0 select a.department,a.department_name,b.staff_name,b.staff_id,c.staff_id,c.department,d.*'
+ ' from run..department a,run..staff_base_infor b,run..staff_dy c,run..staff_contract d '
+ ' where department_name = '+ '''' + trim(sCmbBdepart.Text) + ''''
+ ' and a.department=strtoint(ssgstaff.Cells[1,iRow])'//运行时这里提示在第1行:i,iRow附近有语法错误,ssgstaff.Cells[1,iRow] 是在stringgrid中取当前选中的行的值;
+ ' and b.staff_id=c.staff_id'
+ ' and d.staff_id=c.staff_id';
+ ' from run..department a,run..staff_base_infor b,run..staff_dy c,run..staff_contract d '
+ ' where department_name = '+ '''' + trim(sCmbBdepart.Text) + ''''
+ ' and a.department=strtoint(ssgstaff.Cells[1,iRow])'//运行时这里提示在第1行:i,iRow附近有语法错误,ssgstaff.Cells[1,iRow] 是在stringgrid中取当前选中的行的值;
+ ' and b.staff_id=c.staff_id'
+ ' and d.staff_id=c.staff_id';
a.department,a.department_name,
b.staff_name,b.staff_id,
c.staff_id,c.department,d.*'
+ ' from run..department a,
run..staff_base_infor b,
run..staff_dy c,
run..staff_contract d '
+ ' where department_name = '
+ '''' + trim(sCmbBdepart.Text) + ''''
+ ' and a.department='
+''''+ strtoint(ssgstaff.Cells[1,iRow])+''''
+ ' and b.staff_id=c.staff_id'
+ ' and d.staff_id=c.staff_id';