假设我有表A列
col1 col2 col3 col4
-------------------
sajal singh 28 IND
hello how are you
我想将数据导出到平面文件中,列之间没有空格或制表符
所以输出应该是
cat dump
sajalsingh28IND
hellohowareyou
我试过的.我写了一个剧本
#!/usr/bin/bash
#the file where sql output will go
OUT=report.txt
>$OUT
DESC=desc.txt
>$DESC
sqlplus -s "xxx/xxx@xxx" << END_SQL > /dev/null
set pages 0
set feedback off
set heading off
set trimspool off
set termout off
set verify off
set wrap off
SPOOL $DESC
Select * from table_name;
SPOOL OFF
END_SQL
但我得到多行输出和标签/空格
>所以问题是我该如何解决这个问题?和
>我找到了一些数据泵实用程序,如expdp.我可以在Unix中使用它吗?如果是的话,我怎么能以这种格式实现转储呢?
谢谢