????????????????
???????????? ???????[ 2015/1/20 13:28:59 ] ??????????????? ?????
????????δ????????????????????????У???????????????????λ??????洢??csv????е?????????????????????????csv????????????????????????Щ?????????????????
????“???????”????????????????????????????????????csv????????????????????????????????????????????????????????Python??????????C++?????????????????????Python????????????????Python????ɡ????????C++???????£?
#include <vector>
#include <fstream>
#include <string>
int main(void)
{
//??????????
const int N = 1000;
ifstream fin;
vector<string> file_list??ff;
char x[N];
string ss;
//?????????????б?
fin.open("fff.txt");
while (!fin.eof())
{
fin.getline(x?? N?? '
');
ss.assign(x);
if (ss.size() > 0)
{
file_list.push_back(ss);
}
}
fin.close();
//cout<<file_list.size()<<endl;
ofstream fout?? fout0??fout1??fout2??fout3??fout4??fout5;
string obj_file("x.csv")??path1("F:/download/obj/")??path2("F:/download/outh/");
for (int i = 0; i < file_list.size(); ++i)
{
cout<<i+1<<" "<<file_list[i]<<endl;
int f_num = i / 500;
obj_file[0] = '0'+f_num;
fout.open(path2+obj_file??ofstream::out | ofstream::app);
fin.open(path1+file_list[i]);
bool first = true;
while (!fin.eof())
{
fin.getline(x?? N?? '
');
ss.assign(x);
if (ss.size() > 0 && !first)
{
//1??1004?????
if (i+1<=1004)
{
ss="SH??"+ss;
}
else
{
ss="SS??"+ss;
}
ss.erase(7??1);
ss.erase(9??1);
ss.erase(12??1);
fout<<ss;
}
first = false;
}
fin.close();
fout.close();
}
}
|
?????????????£??????????????????????????б???????????У??????????У??б?????fff.txt??????????????б??????R?е?dir????????????????????????????????????£?????C++?????????????????鰱??6??????С???????????????????????“?г?”??Σ?SH??????У?SS??????С?????????????????yyyymmdd??C++????????????ss.erase()?????????
?????????????????????????洢?????Oracle?н????????“??”??????SQL Developer???????csv????е????????Oracle?????????????????????????????????
???????????漸????????????????????????????????????????????????????????????潲??????????
????1.????????????????????????????????????????????R????????????????????????????????????????????г????????????????????????????????????????????????
????2.???????°??R???г???????汾????????????????????????????????????????????????治????????????С?
????3.???????????????????????????????????Σ????????????????
?????????RODBC????Oracle??R?????????????????????????????????????????????600000????????000001????????????R???????£?
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11