0
我有一個包含以下列的表(電子郵件):在SQL循環和輸出文件中創建「塊」
date;狀態;帳戶;服務器;生日
是10,000條記錄。
我想用塊(csv文件)分隔這些記錄,每個服務器最多有50條記錄。
例如:
server1 : 13 records
server2 : 576 records
server3 : 97 records
server4 : 7 records
etc
列表1
11/12/13; 1; [email protected]; 01/01
11/12/13; 1; [email protected]; 01/01
11/12/13; 0; [email protected]; 01/01
11/12/13; 1; [email protected]; 01/01
11/12/13; 1; [email protected]; 01/01
(Max 50 records server2 ... continues with the next server)
11/12/13; 0; [email protected]; 01/01
11/12/13; 0; [email protected]; 01/01
...
列表2
(begins at record nº 51 from Server2)
11/12/13 0; [email protected]; 01/01
11/12/13 0; [email protected]; 01/01
(more 50 records from server2 ... and continues with the next server that have more than 50 records too)
11/12/13 0; [email protected]; 01/01
....
列表3
(begins at record nº 101 from server2)
11/12/13 0; [email protected] ; 01/01
11/12/13 0; [email protected] ; 01/01
(more 50 records server2 ... and continues with the next server that have more than 100 records too)
11/12/13 0; [email protected]; 01/01
....
直到記錄結束。
我嘗試了很多沒有成功(同時,的foreach,做一段時間,數組,...)
對不起,我的新手問題和感謝。