1832433 Members
3299 Online
110042 Solutions
New Discussion

Copy Table data

 
Saurabh_PB
Occasional Visitor

Copy Table data

We want to copy table data in Tandem from one system to another. Table structure present another system, so we just want to copy the data. Can anyone please suggest commands for this activity? Either using sqlmp or fup utility.

 

Thanks in advance. 

4 REPLIES 4
Mr_Techie
Trusted Contributor

Re: Copy Table data

@Saurabh_PB 

You can use SQLMP or FUP depending on your environment.

For speed, reliability, and simplicity: use FUP COPY. It's optimized for Tandem.

Saurabh_PB
Occasional Visitor

Re: Copy Table data

Thanks for your reply. But in our case, I want to copy the data between two environment. So I am looking for below options (if possible) :- 

1) Generate insert queries from source

or

2) Generate data in csv format , which can be uploaded/inserted into target.

Please let me know , if any of these options available.

Thanks in advance. 

 

Mr_Techie
Trusted Contributor

Re: Copy Table data

@Saurabh_PB 

To copy data between two Tandem (HPE NonStop) environments where the table structure already exists on the target, you have two main options:

Option 1. 

Generate INSERT Statements
Use SQLCI to select data and format it as SQL insert statements:

SELECT 'INSERT INTO target_table VALUES (' || COL1 || ',' || '''' || COL2 || '''' || ');'
FROM source_table;

You can spool the output to a file and run it on the target system.

Option 2. 

Export to CSV Format

You can simulate CSV output in SQLCI:

SET SEPARATOR ',';
SELECT * FROM <schema>.<table>;

Spool the output to a file (data.csv), transfer it, and then use a custom loader or script to insert into the target.

 

NOTE: Note: Tandem does not have a native CSV import utility — inserting from CSV requires a custom loader, script, or small program.

support_s
System Recommended

Query: Copy Table data

Hello,

 

Let us know if you were able to resolve the issue.

If you are satisfied with the answers then kindly click the "Accept As Solution" button for the most helpful response so that it is beneficial to all community members.

 

 

Please click on "Thumbs Up/Kudo" icon to give a "Kudo".


Accept or Kudo