473,804 Members | 3,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Import and triggers

I'm a db2 newbie.
I want to import text file in a db2 table with a primary key and some
foreign key. Import utility works fine but I want bad data to be archived in
a file or in an error table (in oracle sqlldr there are bad files). I've
tried also with db2 load that works fine but there isn's insert_update. So I
thought a before insert trigger but this with this kind of trigger I cannot
insert data in another table.
Any suggestions?

Thanks.
Lino
Nov 12 '05 #1
1 2703
Import into a temp table
use after insert trigger to insert into the real table or bad data table
"Lino" <ad****@libero. it> wrote in message
news:g6******** ***********@twi ster2.libero.it ...
I'm a db2 newbie.
I want to import text file in a db2 table with a primary key and some
foreign key. Import utility works fine but I want bad data to be archived
in
a file or in an error table (in oracle sqlldr there are bad files). I've
tried also with db2 load that works fine but there isn's insert_update. So
I
thought a before insert trigger but this with this kind of trigger I
cannot
insert data in another table.
Any suggestions?

Thanks.
Lino

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1539
by: Stéphane Ninin | last post by:
Hello all, I have an ImportError problem, which is probably correct, but I do not understand it. And how to fix it... Here is the basic structure of the code (I have reduced it first). ROOT:
13
17857
by: usenet | last post by:
Hi. Can any of you explain the major differences in LOAD and IMPORT in laymen terms? I've read the DB2 docs: " Inserts data from an external file with a supported file format into a table, hierarchy, or view. A faster alternative is LOAD; however, the load utility does not support loading data at the hierarchy level."
3
4018
by: Iavor Raytchev | last post by:
Hello, We a situation with a central database that contains the data that needs to be presented at N off-line terminals (N can be 5 000 can be 15 000). Each terminal presents unique data. The central database is used for data preparation. Then the data for each terminal is exported as separate SQL file. The terminals run the same application that is used to prepare the data - only in user mode. So what we do is - we export the full database...
5
2181
by: Konstantin Andreev | last post by:
Recently I became interested, - Are the data, bulk loaded in the table with LOAD utility, consume the same disk space as loaded with IMPORT utility? The answer turned out to be NOT ! Here is a nutshell description of the test. The testing was done at "DB2/LINUX 8.2.3". Tables for tests: F4106 has 5203 rows, 32 columns. F42199 has 1399252 rows, 245 columns.
5
3386
by: Gregor KovaÄ | last post by:
Hi! I have a ASCII file that I need to import with METHOD L, since columns are fixed length. The problem is that I have more columns in a table that I'm importing to that there are columns in the file. Is it possible to specify some default values for columns that are not part of ASCII file? I'd like that default value to be used in INSERT_UPDATE import option. Best regards, Kovi
0
19181
by: jen78 | last post by:
Hi, I am new to Oracle administration and hope someone can help me out on this as i am struggling to make it work.... I am doing development work using oracle database on my own development pc.. the oracle database is installed locally on my pc... how should i port the whole database (including tables, pl sql, triggers, indexes, etc) to another server after all development/testing is completed? I have tried using toad function (DBA ->...
1
1876
by: jrickard | last post by:
Hi, I'm getting an SQL3193N on DB2 v8 (fixpak 11)... SQL3193N The specified view or materialized query table cannot be updated. You cannot LOAD/IMPORT into this view or LOAD into this materialized query table. ....when I try to IMPORT INSERT into my non-updateable view. The view has an INSTEAD OF trigger defined on it, and inserts with standard SQL
4
4695
by: M6C | last post by:
Hello, I'm trying to import a Xml file in a table. It's working find, but when the data are inserted, my trigger on this table doesn't work ? I put my code below. Best regards Thank's
2
7109
by: WP | last post by:
Hello, I've just started to work with DB2 (using the express edition version 9.5 under windows vista) and I'm accessing it through a java program (my java's very rusty). The java program loads the driver, connects and tries to create two tables. That works just fine. Then it tries to import data into one of the tables but it seems I can't use an import command with Statement.execute() because an exception is thrown if I attempt to do this....
0
9711
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10594
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10331
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10087
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9166
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.