- 论坛徽章:
- 0
|
开始的路应该都是这样难走吧,不过没想过放弃.
第一个程序,没有头绪,那位大侠好心写个完整些的代码,或功能极其相似的,
不胜感激啊....可以发至邮箱!
linux oracle c
表STU
{varchar 20 stucode,
number 13 stuamount,
varchar 8 teaid,
char 2 sturesult,
}
TEA
{varchar 8 teaid,
varchar 20 teacode}
所需写入文本记录
select STU.stucode,STU.stuamount,TEA.teacode from STU,TEA
where (STU.sturesult is null or STU.sturesult!='00')
and TEA.teaid=STU.teaid
总笔数num=select COUNT(*) from STU,TEA
where (STU.sturesult is null or STU.sturesult!='00')
and TEA.teaid=STU.teaid
总金额 sum=select SUM(STU.stuamount) from STU,TEA
where (STU.sturesult is null or STU.sturesult!='00')
and TEA.teaid=STU.teaid
文本文件物理名"/home/src/STU20070515.txt"
格式:文件头
char( 当日系统日期|char(9)总笔数|char(16)总金额stuamount
文件体
char(16)stucode|char(16)stuamount|char(20)teacode|char(1)标志默认写入1
文件体中每条新记录都应该另起一行的.
呵呵,大概就是这样了,我想每天定时运行这个程序,生成.txt文件,定时运行就可以写sh了,不过要先实现功能啊
感谢,感谢啊,老大催的好急啊,让我明天写完.................:( |
|