IT分销/经销数据库

db2 怎么去掉sql运行结果的头和尾

db2 怎么去掉sql运行结果的头和尾

比如说
select * from sysibm.dual
DUMMY
-----
X   
  1 条记录已选择。

怎么调用可以去掉
DUMMY
-----


1 条记录已选择。

然后把结果 X 存储到一个 文件中,这个文件可 指定名字

谢谢
参与14

13同行回答

nowhillnowhill系统工程师
谢谢 junli0411  怎么像linux命令一样 ^_^显示全部
谢谢 junli0411  怎么像linux命令一样 ^_^收起
IT分销/经销 · 2012-03-15
浏览1473
junli0411junli0411数据库管理员NULL
db2 -xq "select 'select \"\"' from sysibm.dual ""显示全部
db2 -xq "select 'select \"\"' from sysibm.dual ""收起
互联网服务 · 2012-03-14
浏览1416
nowhillnowhill系统工程师
[db2inst1@localhost db_proc_exp]$ db2 -xq "select 'select ""' from dual"select            --为什么 "" 没有了?显示全部
[db2inst1@localhost db_proc_exp]$ db2 -xq "select 'select ""' from dual"
select            --为什么 "" 没有了?收起
IT分销/经销 · 2012-03-14
浏览1472
nowhillnowhill系统工程师
谢谢junli0411  ^_^显示全部
谢谢junli0411  
^_^收起
IT分销/经销 · 2012-03-14
浏览1619
junli0411junli0411数据库管理员NULL
运行一下  db2 list command options  就可以列出所有的这些参数,里面也有解释db2 list command options     Command Line Processor Option Settings Backend process wait time (seconds)       &nb...显示全部
运行一下  db2 list command options  就可以列出所有的这些参数,里面也有解释
db2 list command options

     Command Line Processor Option Settings

Backend process wait time (seconds)        (DB2BQTIME) = 1
No. of retries to connect to backend        (DB2BQTRY) = 60
Request queue wait time (seconds)          (DB2RQTIME) = 5
Input queue wait time (seconds)            (DB2IQTIME) = 5
Command options                           (DB2OPTIONS) =

Option  Description                               Current Setting
------  ----------------------------------------  ---------------
   -a    Display SQLCA                             OFF
   -c    Auto-Commit                               ON
   -d    Retrieve and display XML declarations     OFF
   -e    Display SQLCODE/SQLSTATE                  OFF
   -f    Read from input file                      OFF
   -i    Display XML data with indentation         OFF
   -l    Log commands in history file              OFF
   -m    Display the number of rows affected       OFF
   -n    Remove new line character                 OFF
   -o    Display output                            ON
   -p    Display interactive input prompt          ON
   -q    Preserve whitespaces & linefeeds          OFF
   -r    Save output to report file                OFF
   -s    Stop execution on command error           OFF
   -t    Set statement termination character       OFF
   -v    Echo current command                      OFF
   -w    Display FETCH/SELECT warning messages     ON
   -x    Suppress printing of column headings      OFF
   -z    Save all output to output file            OFF收起
互联网服务 · 2012-03-14
浏览1722
上官小枝上官小枝数据库管理员易购
回复 2# junli0411     受教啦!!显示全部
回复 2# junli0411


    受教啦!!收起
2012-03-14
浏览1625
nowhillnowhill系统工程师
to junli0411 您能把 db2 -  后面的参数介绍介绍?给个帖子也可以,谢谢显示全部
to junli0411
您能把 db2 -  后面的参数介绍介绍?
给个帖子也可以,谢谢收起
IT分销/经销 · 2012-03-14
浏览1608
andyliuandyliu软件开发工程师计算机软件与技术
学习了显示全部
学习了收起
互联网服务 · 2012-03-14
浏览1597
nowhillnowhill系统工程师
谢谢 junli0411显示全部
谢谢 junli0411收起
IT分销/经销 · 2012-03-14
浏览1608
xiewenpengxiewenpeng数据库开发工程师河南众品
3楼 {:3_47:}高人显示全部
3楼 {:3_47:}高人收起
互联网服务 · 2012-03-14
浏览1587

提问者

nowhill
系统工程师

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2012-03-13
  • 关注会员:1 人
  • 问题浏览:8478
  • 最近回答:2012-03-15
  • X社区推广