View previous topic :: View next topic
|
Author |
Message |
janusman
New User
Joined: 09 Sep 2008 Posts: 31 Location: India
|
|
|
|
Hi,
I have a requirement wherein, i need to split a file into 4 equal parts.
There are no predefined conditions or anything for splitting up.
There is no dynamic input on how much splits.
One file - 4 splits. Obviously if the record count is not divisible by 4, the 4th split will have a lesser no. of records compared to other 3.
Can someone give a heads-on how this can be acheived? |
|
Back to top |
|
|
janusman
New User
Joined: 09 Sep 2008 Posts: 31 Location: India
|
|
|
|
To clarify
if the i/p has 20 records,
output shud be
o/p1 - first 5 records
o/p2 - next 5 records
o/p3 - next 5
o/p4 - last 5 records
If the i/p has 23 records
o/p1 - first 6 records
o/p2 - next 6
o/p3 - next 6
o/p4 - remaining - in this case - 5 records |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
This has been asked multiple times previously. From those topics, here is the response:
|
|
Back to top |
|
|
janusman
New User
Joined: 09 Sep 2008 Posts: 31 Location: India
|
|
|
|
Hi,
My bad. thanx. |
|
Back to top |
|
|
|