DB2

DB2 is IBM's offering to the highend database market. The latest version of DB2 (Universal Database) is ideal for OLTP, Data Warehousing, Decision Support and everything in between. It's well priced, extremely scalable and runs on virtually every platform out there from handhelds to mainframes.

Import from ixf file in Table which have more columns


I would like to import data from ixf file into a table which have 2 more columns.
Is any db2 statement which make possible to import data from ixf file into the table which has two more columns and update 2 other columns with particular value ?
Thanks
Ross
Originally Posted by rshehu
I would like to import data from ixf file into a table which have 2 more columns.
Is any db2 statement which make possible to import data from ixf file into the table which has two more columns and update 2 other columns with particular value ?
Thanks
Ross
As far as I know you cannot do this in one step. You can import the data like:
import from f.ixf of ixf insert into T (c1, c2)
Note that you need to drop any not null constraints for remaining columns. Then update, and restore constraints that where dropped.
Another option, import data to temp table and do a merge from there.
If you have access to the export process you can add the "missing" columns there.
/Lennart
Hi Lennart,
I was having the same idea but I thought I might be able to import from .ixf file and in the same time to add two more columns in the table.
I was having problems when I imported to a copy temporal table because of NULL constraint.
In this temporal Table I can remove this constrain.
Thanks!!
Ross

Related Links

DB2 Stored Procedure Builder
To timeout db connection, what can I do?
COBOL program on OS390 can access a SQL2000 database?
Error using || or CONCAT in DB2 SQL procedure
Using Autonomus transactions in DB2
What is FOR FETCH ONLY parameter
Error Building DB2 SQL Procedure
formula for calculating tablespace growth
Error Building DB2 SQL Procedure
DB2 Command Centre
One or more values in the INSERT statement, UPDATE statement, or foreign key update c
The cursor specified in a FETCH or CLOSE statement is not open
test
db2 security
online incremental backups in DB2
DB2 stored procedures filesystem full errors

Categories

DataBase Dev
MongoDB
Adabas
DB2
Informix
Microsoft SQL Server
MySQL
Oracle
Pervasive.SQL
PostgreSQL
Sybase
Other
ASP
Crystal Reports
Delphi, C etc
JAVA
Perl and the DBI
PHP
ANSI SQL
Unix Shell Scripts
Visual Basic
Brilliant Database
Corel Paradox
FileMaker
Microsoft Access
Microsoft Excel
Other PC Databases
New Members & Introduc...
Applications & Tools
Database Concepts & De...
Chit Chat
Marketplace
Job Opportunities
Suggestions & Feedback

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App