将 headers 添加到 SQL (Sybase) 输出
Add headers to a SQL (Sybase) output
我创建了一个脚本来执行 sql (Sybase)
#!/bin/bash
command=$(
isql -U databasename_dba -P password -b <<EOF!
select label1, label2 from TABLE
go
EOF!
)
echo "$command" >> output_file.csv):
到目前为止一切正常,文件已生成:
但如您所见,输出显示在 1 列中。
可以添加 "Headers" 并将列分为 2 列,我想要的输出是:
尝试删除 -b。
#!/bin/bash
command=$(
isql -U databasename_dba -P password <<EOF!
select label1, label2 from TABLE
go
EOF!
)
echo "$command" >> output_file.csv):
我创建了一个脚本来执行 sql (Sybase)
#!/bin/bash
command=$(
isql -U databasename_dba -P password -b <<EOF!
select label1, label2 from TABLE
go
EOF!
)
echo "$command" >> output_file.csv):
到目前为止一切正常,文件已生成:
但如您所见,输出显示在 1 列中。
可以添加 "Headers" 并将列分为 2 列,我想要的输出是:
尝试删除 -b。
#!/bin/bash
command=$(
isql -U databasename_dba -P password <<EOF!
select label1, label2 from TABLE
go
EOF!
)
echo "$command" >> output_file.csv):