Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Alter a null column into a not null column

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Wed Jul 15, 2015 3:05 pm    Post subject: Alter a null column into a not null column
Reply with quote

Hi all,

I tried to alter a null column of a table into a not null column in the local server using an alter statement. The table is empty. But the query I executed is not giving the actual result.
The query I tried
Code:
ALTER TABLE DEPT1 ALTER COLUMN DEPTNO SET NOT NULL WITH DEFAULT;


the result i got is
Code:
DSNT408I SQLCODE = -104, ERROR:  ILLEGAL SYMBOL "NOT". SOME SYMBOLS THAT MIGHT
         BE LEGAL ARE: CYCLE, NOCYCLE, ORDER, NOCACHE, NOORDER, NOMINVALUE,
         NOMAXVALUE

The version I used is DB2 v8.1

Can any one help me..

Thanks in advance
Raghunathan
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Wed Jul 15, 2015 3:47 pm    Post subject: Reply to: Alter a null column into a not null column
Reply with quote

I think your DB2 is out of service. Anyway, the manuals are still there. What did you try to resolve this? There's a big clue in the message about what is the SQL processor thinks is wrong with that line, but you need some research.
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Mon Jul 20, 2015 10:31 am    Post subject: Reply to: Alter a null column into a not null column
Reply with quote

Thanks Bill for your comments

Regards
Raghunathan
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us