Solved

Alter Table in AS400

Posted on 2004-04-23
5
5,082 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 33

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
db2 z/os V10 access path 7 340
Wrong record extracting - DB2 SQL 10 163
Tsm library capacity monitor warning 5 174
I need a like query for db2 3 79
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 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

14 Experts available now in Live!

Get 1:1 Help Now