Exforsys

Free Training

modifying a column in the table

This is a discussion on modifying a column in the table within the SQL Server 2005 Tutorials forums, part of the Articles and Tutorials category; Hi, I would like to add new fields(column) in the already existing table in SQL server mangement studio.2005 When I ...

Go Back   Exforsys > Articles and Tutorials > SQL Server 2005 Tutorials

Exforsys.com


SQL Server 2005 Tutorials SQL Server 2005 Tutorials and Articles discussions

Reply

 

LinkBack Thread Tools Search this Thread
  #1 (permalink)  
Old 01-30-2009, 05:58 AM
Junior Member
 
Join Date: Dec 2008
Posts: 2
sowmyav is on a distinguished road
modifying a column in the table

Hi,
I would like to add new fields(column) in the already existing table in SQL server mangement studio.2005
When I added the needed fields,I want to use the check constraint to check the 2 fields namely
PROD_STATUS char(10) IN or OUT
ANAL_FLAG char(10) YES or NO
it should have only the above mentioned values in the table.So could any please let me know how to proceed on the same as I am getting the error as
follows:
'SYS_200812' table
- Unable to modify table.
Cannot insert the value NULL into column 'PROD_STATUS', table 'AS.dbo.Tmp_SYS_200812'; column does not allow nulls. INSERT fails.
The statement has been terminated.


'SYS_200812' table
- Unable to modify table.
ALTER TABLE only allows columns to be added that can contain nulls, or have a DEFAULT definition specified, or the column being added is an identity or timestamp column, or alternatively if none of the previous conditions are satisfied the table must be empty to allow addition of this column. Column 'PROD_STATUS' cannot be added to non-empty table 'SYS_200812' because it does not satisfy these conditions.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
General Ledger – Technical dongta_ndh Oracle Apps 1 09-10-2009 07:34 AM
Import EXCEL Data into QTP Global Data Table venkata krishnamurthy t Software Testing 7 12-09-2007 11:59 PM
Want to change the datatype of the column siri6589 Oracle Database 2 04-22-2007 12:44 PM
SQL Server FAQ Limca SQL Server 1 04-27-2006 06:25 PM
[FAQ] FileMaker Pro - database for Macintosh and Windows Martin Trautmann Tech FAQ 0 04-17-2004 08:26 AM


All times are GMT -4. The time now is 06:51 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.