473,785 Members | 2,777 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[LOAD] UDB v.7 statement: correct?

Hi NG,

I'm currently working on a small business database and now it is time
to populate it with some data. For this purpose I'll use the LOAD
utility. Unfortunately, I will not have any DB2 access till next
month, so there is no possibility for me to prove, if the statements
are actually correct... It would be very cool, if you could take a
look at this. :)

DEPTFILE has 4 elements:

EL1 positions 01 to 04
EL2 positions 05 to 20
EL3 positions 21 to 40
EL4 positions 41 to 44

DEPTTABLE has 4 columns

COL1 CHAR 4 NOT NULL
COL2 INTEGER
COL3 VARCHAR 16 NOT NULL
COL4 VARCHAR 20

COL1 = "department shortcut"
COL2 = "number of employees"
COL3 = "department title"
COL4 = "comment"

COL1 is primary key!

The following command sould delete all existing data from the table
und populate it with the input data.

db2 load data
from DEPTFILE
of asc
modified by striptblanks usedefaults
method L (1 4,5 20,21 40,41 44)
null indicators (0, 0, 21, 41)
replace into ASCTABLE (COL1, COL3, COL4, COL2)

If there are only blanks between 41 and 45, the value in COL2 will be
NULL (no employees in the department). Zero would do just fine, but
it's only an example. :)
If there are only blanks between 21 and 40, the value in COL4 will be
NULL.

I do appreciate everyones help!!!

Thanks in Advance,

S.B.

P.S. Sorry for my bad English... :(
Nov 12 '05 #1
2 2036
Stefan Bauer wrote:
db2 load data


should be "db2 load" only.
The command has to be executed on the server.
On a client use "db2 load client" or "db2 import"

HTH

Joachim Banzhaf

Nov 12 '05 #2
remove default class

that wil fix
Joachim Banzhaf <jb******@ngi.d e> wrote in message news:<o3******* *****@banzhaf.d nsalias.net>...
Stefan Bauer wrote:
db2 load data


should be "db2 load" only.
The command has to be executed on the server.
On a client use "db2 load client" or "db2 import"

HTH

Joachim Banzhaf

Nov 12 '05 #3

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

Similar topics

4
4825
by: veronica24 | last post by:
I need some help. I am currently running a load script on db2 version 7 on an AIX 5.1.02 server in our production environment. We have upgraded our test server with db2 version 8 AIX 5.2..03. The load script does not run now. I am getting a SQL3025N A parameter specifying a filename or path is not valid. The input file is located in my current working directory. I own the file and have done a chmod 777 to make sure it was not a...
9
21651
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter the results in the grid. Say you filter the grid for records that have a certain condition set to "NO" (in this case a checkbox). In this scenario the search returns one result. If I then check the checkbox ("YES") and save it, I now get my message...
2
2268
by: Randal Chapman | last post by:
I just started getting a strange error in my asp.net project. One page is returning the parser error of cannot load type. I have checked and re-checked the inherits statement = namespace.class name and everything is fine. Other pages with code behind work fine, and are in the same dll so I know it's using the correct dll. I have deleted and rebuilt the dll, all to no avail. Any ideas? _Randal
10
5025
by: technocrat | last post by:
How can i find the load state of the table using SQL, i can do "load query table tablename" but i cannot execute this as a sql statement. What i want to do is, i m using a java stored priocedure to load a table, now after loading, i want to make sure load completed successfully by checking the state of the table like if(tablestate.equals("N")) {proceed forward} else break here..
1
5961
by: huyuhui | last post by:
The following is a question of LOAD utility. Question: How does the DB2 enforce table check constraints for data added to table with the LOAD utility? A. With the BUILD phase of LOAD B. With the SET INTEGRITY statement C. With the DELETE phase of the LOAD D. With the UPDATE CONSTRAINTS statement Answer is A
0
9645
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
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10151
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
10092
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
8973
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
7499
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...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3647
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
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.