Hi All,
Can any one help me achieving below scenario.
Input:
No Name
1 ABC
2 ABC
3 ABC
4 ABC
5 ABC
6 ABC
7 ABC
8 ABC
9 ABC
10 ABC
11 ABC
12 ABC
13 ABC
14 ABC
15 ABC
16 ABC
17 ABC
18 ABC
19 ABC
20 ABC
21 ABC
22 ABC
23 ABC
24 ABC
Target:1
No Name
1 ABC
2 ABC
3 ABC
4 ABC
5 ABC
6 ABC
7 ABC
8 ABC
9 ABC
10 ABC
21 ABC
22 ABC
23 ABC
24 ABC
Target:2
No Name
11 ABC
12 ABC
13 ABC
14 ABC
15 ABC
16 ABC
17 ABC
18 ABC
19 ABC
20 ABC
First 10 records has to written to Target1 and next 10 records to Target2 then again next 10 records needs to written to Target1 and so on...
How to achieve the Scenario???
Moderators: chulett, rschirm, roy
Been discussed here quite a bit, here are some random examples. Can depend on how you want to control the naming of each file. The last one is specific to the 9.1 release as they added that functionality to the Sequential File stage in that release. Any other solution would be more of a 'workaround'.
viewtopic.php?t=150941
viewtopic.php?t=133224
viewtopic.php?t=151550
viewtopic.php?t=150941
viewtopic.php?t=133224
viewtopic.php?t=151550
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Sorry, missed the point that it was only ever two. Then just two targets and constraints to send the rows to one or the other based on your row number. I would leverage the Mod() function and switch the output immediately after the result = zero, meaning you've just written the 10th record to the target.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
refer to the below post for Ray's solution using Mod function..
viewtopic.php?t=153014
viewtopic.php?t=153014