Greetings all,
Machine : PENTIUM
Os :Windows 2000
Product : DB2 UDB EE Release : 7.2
I've extracted data from a RDBMS database and try to load into DB2
database. I extracted the data in the form of delimited ASCII format.
The separator for
each colum is '|'
I found that some of the colum value of the data file is in '*' value.
The
representation of null value for colums on that particular RDBMS is
'*'. Therefore column like integer,date, time and string would be
represented as
'*' if it is null
For an example below is a portion of data file
-------------------------------------------
CIP| 1| *****| ********|Ciprofloxacin
CHL| 1| *****| ********|Chloramphenicol
CEP| 1| *****| ********|Cephalothin
The 3rd colums is an integer data type and the 4th is a date data
type.
Table structure for the above data is as follows
CREATE TABLE "LAB"."ANTIBIOTIC" (
"CODE" VARCHAR(3) NOT NULL ,
"KEY_NUM" INTEGER NOT NULL ,
"SUPER_NUM" INTEGER ,
"SUPER" DATE,
"NAME" VARCHAR(40) ,
"UNIT_COST" DECIMAL(12,2) ,
"UNITS" VARCHAR(15) ,
"DOSAGE" VARCHAR(15) )
IN "LISUSRTBLSPACE_3" ;
-- DDL Statements for primary key on Table "LAB"."ANTIBIOTIC"
ALTER TABLE "LAB "."ANTIBIOTIC"
ADD PRIMARY KEY
("CODE",
"KEY_NUM");
The load commad used is
LOAD FROM F:\reload_reject\labantibiotic OF DEL MODIFIED BY dumpfile =
f:\reload_reject\labantibiotic.rej
pagefreespace=0 totalfreespace=0 coldel| chardel"" decpt.
timeformat=""HH:MM"" dateformat=""DD/MM/YYYY""
MESSAGES db2load.msg INSERT INTO LAB.ANTIBIOTIC COPY NO INDEXING
MODE
AUTOSELECT ;
commit work
The above statement seem to fail as DB2 could not understand data
value '*'
for INTEGER and DATE data type. I tried using USEDEFAULTS option in my
LOAD command but it still fails. How do i load the '*' value into the
table?
Is is possible ?
Please advice.
Thanks in advance.
Uthuras 2 2930
The easiest would be to edit the file and replace |********| by ||.
Uthuras wrote: Greetings all,
Machine : PENTIUM Os :Windows 2000 Product : DB2 UDB EE Release : 7.2
I've extracted data from a RDBMS database and try to load into DB2 database. I extracted the data in the form of delimited ASCII format. The separator for each colum is '|'
I found that some of the colum value of the data file is in '*' value. The representation of null value for colums on that particular RDBMS is '*'. Therefore column like integer,date, time and string would be represented as '*' if it is null
For an example below is a portion of data file
------------------------------------------- CIP| 1| *****| ********|Ciprofloxacin CHL| 1| *****| ********|Chloramphenicol CEP| 1| *****| ********|Cephalothin
The 3rd colums is an integer data type and the 4th is a date data type. Table structure for the above data is as follows
CREATE TABLE "LAB"."ANTIBIOTIC" ( "CODE" VARCHAR(3) NOT NULL , "KEY_NUM" INTEGER NOT NULL , "SUPER_NUM" INTEGER , "SUPER" DATE, "NAME" VARCHAR(40) , "UNIT_COST" DECIMAL(12,2) , "UNITS" VARCHAR(15) , "DOSAGE" VARCHAR(15) ) IN "LISUSRTBLSPACE_3" ;
-- DDL Statements for primary key on Table "LAB"."ANTIBIOTIC"
ALTER TABLE "LAB "."ANTIBIOTIC" ADD PRIMARY KEY ("CODE", "KEY_NUM");
The load commad used is
LOAD FROM F:\reload_reject\labantibiotic OF DEL MODIFIED BY dumpfile = f:\reload_reject\labantibiotic.rej pagefreespace=0 totalfreespace=0 coldel| chardel"" decpt. timeformat=""HH:MM"" dateformat=""DD/MM/YYYY"" MESSAGES db2load.msg INSERT INTO LAB.ANTIBIOTIC COPY NO INDEXING MODE AUTOSELECT ;
commit work
The above statement seem to fail as DB2 could not understand data value '*' for INTEGER and DATE data type. I tried using USEDEFAULTS option in my LOAD command but it still fails. How do i load the '*' value into the table? Is is possible ?
Please advice.
Thanks in advance.
Uthuras
--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands
Greetings Anton,
It works! Thanks.
Uthuras
Anton Versteeg <an************@nnll.iibbmm.com> wrote in message news:<3F**************@nnll.iibbmm.com>... The easiest would be to edit the file and replace |********| by ||.
Uthuras wrote:
Greetings all,
Machine : PENTIUM Os :Windows 2000 Product : DB2 UDB EE Release : 7.2
I've extracted data from a RDBMS database and try to load into DB2 database. I extracted the data in the form of delimited ASCII format. The separator for each colum is '|'
I found that some of the colum value of the data file is in '*' value. The representation of null value for colums on that particular RDBMS is '*'. Therefore column like integer,date, time and string would be represented as '*' if it is null
For an example below is a portion of data file
------------------------------------------- CIP| 1| *****| ********|Ciprofloxacin CHL| 1| *****| ********|Chloramphenicol CEP| 1| *****| ********|Cephalothin
The 3rd colums is an integer data type and the 4th is a date data type. Table structure for the above data is as follows
CREATE TABLE "LAB"."ANTIBIOTIC" ( "CODE" VARCHAR(3) NOT NULL , "KEY_NUM" INTEGER NOT NULL , "SUPER_NUM" INTEGER , "SUPER" DATE, "NAME" VARCHAR(40) , "UNIT_COST" DECIMAL(12,2) , "UNITS" VARCHAR(15) , "DOSAGE" VARCHAR(15) ) IN "LISUSRTBLSPACE_3" ;
-- DDL Statements for primary key on Table "LAB"."ANTIBIOTIC"
ALTER TABLE "LAB "."ANTIBIOTIC" ADD PRIMARY KEY ("CODE", "KEY_NUM");
The load commad used is
LOAD FROM F:\reload_reject\labantibiotic OF DEL MODIFIED BY dumpfile = f:\reload_reject\labantibiotic.rej pagefreespace=0 totalfreespace=0 coldel| chardel"" decpt. timeformat=""HH:MM"" dateformat=""DD/MM/YYYY"" MESSAGES db2load.msg INSERT INTO LAB.ANTIBIOTIC COPY NO INDEXING MODE AUTOSELECT ;
commit work
The above statement seem to fail as DB2 could not understand data value '*' for INTEGER and DATE data type. I tried using USEDEFAULTS option in my LOAD command but it still fails. How do i load the '*' value into the table? Is is possible ?
Please advice.
Thanks in advance.
Uthuras
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Carlos G Benevides |
last post by:
I have a ASP.Net web application that has two assemblies that run
under com+. Under Windows 2000 the two assemblies are added to com+
automatically when instantiated from the web site. For this...
|
by: StephenRichter |
last post by:
I have installed the trial of db2 enterprise server on my w2k PC. Have
also installed fix pack 8 of that product.
I am using it to connect from an asp.net web page to an IBM as400. the
400 is...
|
by: DT |
last post by:
We have service oriented architecture
that comprises of a number of Win2k/IIS boxes.
Some of these web service applications access an AS400
system for data acess (We are using HitSoftware's Ritmo...
|
by: Chris Bower |
last post by:
Reposted from aspnet.buildingcontrols:
Ok, I've got a bunch of derived controls that all have a property Rights of
type Rights (Rights is an Enumerator). I wrote a custom TypeConverter so
that I...
|
by: Abi |
last post by:
We able to generate this error in our test environment and were able to
research this enough to understand that the issue is NOT with an abject that
needs to be serialized but rather as the stack...
|
by: whidbey |
last post by:
Hello friends, I am whidbey, new to thescripts and dot net as well.I am working over Online Shopping Cart,web application.I design a page (webform5.aspx) where user search books then select the books...
|
by: whidbey |
last post by:
Hello friends, I am whidbey, new to thescripts and dot net as well.I am working over Online Shopping Cart,web application.I design a page (webform5.aspx) where user search books then select the books...
|
by: wildman |
last post by:
Trying to read XML files from SSIS and load into SQL Server.
I tested this before and it was working before I placed in a forevery
contrainer. also, my simple xml file had to be retyped cause I...
|
by: Elliot |
last post by:
When decrypt the xml, output "Unable to retrieve the decryption key."
Can anyone help me solve the problem?
I got the code from http://msdn.microsoft.com/en-us/library/ms229746.aspx
using...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
| |