Neeraj Dwivedi (5/7/2013)
What I can see from your result that, once you get 'Trl' from Substring([Column 0], 4, 3), every thing else below that will be assigned Partitionid = 2. Is that right?
Below the trailer record (we can get it by Substring([Column 0], 4, 3) = 'Trl') will be a new partition. But there can be more than two partitions, so yes, a new partition will start after the trailer record, but not everything else will be assigned Partition = 2.