我正在尝试填充一个名为“复制”的列。如果学生已经注册了该学期和该职业的课程,则应将其标记为N,否则应将其标记为是。父表有4000万行。我拥有的SQL是
Select Duplicate = Case when e.EMPLID is null then 'Y'
when e1.EMPLID is null then 'Y'
else 'N'
end
from F_Student_Programs_05 b
left outer join PS_STUDENT_ENRL e on b.EMPLID = e.EMPLID and
b.Term_Code = e.STRM and
e.ACAD_CAREER = 'EXED'
left outer join PS_STUDENT_ENRL e1 on b.EMPLID = e1.EMPLID and
b.Term_Code = e1.STRM and
e1.ACAD_CAREER = 'CNED'
如果我在数据流任务中运行此代码,它在SSIS中传送8,192行后就会卡住。有人可以就如何使其发挥作用提出一些建议吗? 仅供参考 - 我使用MS SQL, 提前谢谢!