请教问题informix时间函数问题
我要从数据库里定时onload出文件,我想onload以后文件名为系统当前时间,请问如何做? 我要从数据库里定时onload出文件,我想onload以后文件名为系统当前时间,请问如何做?374063 发表于 2010-03-01 09:47 http://bbs.chinaunix.net/images/common/back.gif
onload压根就是到磁带上的呀~
Usage: onload [-l] [-t <tape device>] [-b <block size>] [-s <tape size>]
[-d <DBspace>] <database>[:[<owner>.]<table>]
[{-i <old index name> <new index name>}]
[{-fd old-DBspace-name new-DBspace-name}]
[{-fi index-name old-DBspace-name new-DBspace-name}]
[{-c <old constraint name> <new constraint name>}]
onload to filename
select * from table
存到磁盘上了 onload to filename
select * from table
存到磁盘上了
374063 发表于 2010-03-01 10:02 http://bbs.chinaunix.net/images/common/back.gif
onload-------> unload
onload 跟 unload 是两个东东~
unload to filename filename用时间格式的话,最好使用shell做,在dbaccess里暂时没好办法..
#!/bin/sh
# filename: 1.sh, unload use OS time
OSTIME=`date +%Y%m%d%H%M%S`
dbaccess DBNAME - <<!SQL >>/dev/null 2>>/dev/null
unload to tabname_${OSTIME}.unl
select * from tabname;
!SQL
exit 0
页:
[1]