Solved

Alter Table in AS400

Posted on 2004-04-23
5
5,004 Views
Last Modified: 2016-11-01
Hi.. I want to ask to You.
How syntac ALTER TABLE in DB2 (AS 400 Server / STRSQL)
My syntax is :

ALTER TABLE tristotr ADD COLUMN fieldtest DEC (18,2) NOT NULL WITH DEFAULT

that syntax is correct but IF I again INSERT FIELD IN TRISTOTR

   ALTER TABLE tristotr ADD COLUMN fieldtest2 DEC (18,2) NOT NULL
WITH DEFAULT

I get error  “SQL SYSTEM ERROR” , what's wrong ?



Regard
0
Comment
Question by:triary
5 Comments
 
LVL 32

Expert Comment

by:shalomc
ID: 10908272
How do you try to alter the table? From a green screen? from Operations Navigator?
0
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 10911663
have you tried commiting the frst alteration?
0
 

Author Comment

by:triary
ID: 10915261
To : Lowfatspread

Pls, give me sample syntax for alter table and commit .

because I get error 'Commit or Rollback not valid'
0
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 50 total points
ID: 10920721
ALTER TABLE tristotr
ADD COLUMN fieldtest DEC (18,2) NOT NULL WITH DEFAULT
;
COMMIT
;
   ALTER TABLE tristotr
 ADD COLUMN fieldtest2 DEC (18,2) NOT NULL
WITH DEFAULT
;
COMMIT
;
0
 

Expert Comment

by:Hafid Muhammad
ID: 41869471
Thanks for share
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now