从命令行运行包含 WbExport(使用 Select 语句)的 sql 脚本时,我遇到了一个问题。目标文件夹中缺少 txt 文件和导入 sql 脚本命令提示符显示语句已执行,但我认为执行命令时选择语句未运行。
在不使用 Select 语句的情况下,我得到了所需的输出文件,但 Import SQL 脚本中缺少列名,这就是我在 WbExport 中尝试 Select 语句方法的原因。
命令:
java -jar sqlworkbench.jar -profile=New_profile -script=cmd_test.sql
sql脚本(cmd_test.sql):
WbExport
-type=text
-file='D:\Migration\CMD_TEST\employee.txt'
-delimiter='~'
-quotechar='^'
-encoding=UTF8
-quoteCharEscaping=duplicate
-formatFile=postgres
-header=true
-decimal='.'
-dateFormat='yyyy-MM-dd'
-replaceExpression='(\n|\r\n)' -replaceWith='';
select * from ces_prj_raymond_poc.dbo.employee; ------------I think this statement is not executing.
txt数据文件和表的导入sql脚本