How to Fetch Invalid records of certain condition in SSIS

时间:2017-08-05 12:30:00

标签: ssis

I Have 5 records with RecordID as below RecordID 3@, 20, 20, 10, 20 i want to fetch only the records which have RecordID 10 followed by 20. How to do this in SSIS.

1 个答案:

答案 0 :(得分:0)

我必须在这里做一个重要的假设(你有一个有序的标识栏)

- 选择记录ID 10行,其后是记录ID 20行。

select t1.*
from table t1
 join table t2 on t1.[Identitycolumn] = t2.[identityColumn]+1
where t1.recordID='10' and t2.RecordID='20' -- Looks like you have a string '3@'