Epicenter
Epicenter

Reputation: 35

IBM Datastudio how to export/unload and import/load multiple tables with SQL?

I'm having issues using the normal sysproc.admin_cmd I thought we should use, as I get error SQL3001. It says I should put the file location of the export to bcufenc folder, but I can't find it, maybe because it is data studio client on my machine.

I was hoping to get pointed in the right direction on this, or another way to export/unload and import/load

I just want to transfer data from one table to a table with the same structure in another state or scheme, as in the columns are the same, I just need to transfer the data.

Thank you in advance!

Upvotes: 0

Views: 1942

Answers (1)

mustaccio
mustaccio

Reputation: 19001

If source and target tables are in the same Db2 database, consider using the LOAD FROM (<query>) variant of ADMIN_CMD

CALL SYSPROC.ADMIN_CMD('LOAD FROM (SELECT * FROM T1) OF CURSOR INSERT INTO T2')

Upvotes: 0

Related Questions