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

configuration tool error
Transformation of date format
Date and Time Dimensions
Insert data via ODBC to DB (AS400/DB2) problem
Privileges for user.
Turn alpha-numeric range to IN list
status tablespace in process restore?
Strange problem with DB2 COmmand Center
URGENT - copye a full database
Stupid question
DB2 Backup with TSM failing with SQL2062N and Reason Code 610
Task Center - User Interface Scheduling
Full tablescan
ON DELETE RESTRICT vs ON DELETE NO ACTION
DB2 scheduled backup
DB2 Performance problem

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