ratm
ratm

Reputation: 923

Exporting result of multiple select statement with db2 export command?

Is it possible to export result of multiple select statement with db2 "export" command ( https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0008303.html ) like db2 command line processor (ie db2 -tvf file.sql with many sql request in file.sql) ?

Best regards

Upvotes: 0

Views: 1021

Answers (1)

Paul Vernon
Paul Vernon

Reputation: 3901

Do you mean like this?

$ cat export
export to f1 of del values 1;
export to f2 of del values 2;

$ db2 -tf export
SQL3104N  The Export utility is beginning to export data to file "f1".

SQL3105N  The Export utility has finished exporting "1" rows.


Number of rows exported: 1


SQL3104N  The Export utility is beginning to export data to file "f2".

SQL3105N  The Export utility has finished exporting "1" rows.


Number of rows exported: 1

Upvotes: 1

Related Questions