Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
bondwiththebest
Starting Member
46 Posts |
Posted - 2009-03-05 : 17:38:00
|
Hi everyone,I have a flat file connection and then I just need 200 samples from file which has N rows. N is generally more than 1000 rows. I tried to use row/% sampling but it would not use for me. I need to use script component. Can any one give me an idea how to read from script component and get only 200 samples???? I have added a identity col. in the before task. So i just need to find out which row I need to use from script component. Can any one help me with the script component?? To configure the i/o col......?? |
|
tmitch
Yak Posting Veteran
60 Posts |
Posted - 2009-03-05 : 22:44:50
|
You could do this with a script task by including a While loop in your script logic.You might also check out the Konesans Row Number Transformation (http://www.sqlis.com/post/Row-Number-Transformation.aspx). You might be able to use this in conjunction with a conditional split. I haven't used this transformation, but the Konesans tools I have used have proven quite useful.hth,Tim---------------------Tim Mitchellwww.BucketOfBits.com |
 |
|
bondwiththebest
Starting Member
46 Posts |
Posted - 2009-03-06 : 08:17:37
|
I need to use a script component because it is in a data flow task. I have used a script component to add the identity col., instead of using other software.But I not sure what Do I need to add the condition in the "conditional split" task!!! Can you help me with that.How Do I select 200 rows from N rows using a conditional split task, spread evenly across the file ??? I cant figure it out!!! |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-07 : 14:09:31
|
just include a condition based on row number value like RowNumber between startval1 and endval1... |
 |
|
|
|
|