Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need alter constraint syntax for check constraint

Posted on 2001-07-27
2
Medium Priority
?
730 Views
Last Modified: 2009-12-16

I can't get this thing to work.  I have added a new condition 'Billing Maintenance' and need to recompile the contraint.  Do I have to drop it and add it?  Do I need to drop the table and recreate it with the new value?  It looks like all you can do with a alter constraint is turn it on and off.   How do I do this.

ALTER TABLE ctms.requesttyperef MODIFY CONSTRAINT ck_requestflag
IN('Billing Maintenance','Deploy','Redeploy','Account Maintenance',
'Account Service','Supplies Maintenance', 'Third Party Equipment Billing'
,'Do Not Process','Customer Owned Services','Deploy Peripherals',
'Leasing Services','Convert','Internet Services','Salesperson Deploy'
,'Front End Conversion');
0
Comment
Question by:DonFreeman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Expert Comment

by:leolkk
ID: 6327143
If there are NEW values,
1) i am used to drop the "CONSTRAINT" first.
2) after updating corresponding data. I will then add a new constraint.

If there is NO new values,
1) I turn it off
2) update data
3) turn it on again
0
 
LVL 5

Accepted Solution

by:
ser6398 earned 150 total points
ID: 6327151
Try the following:

ALTER TABLE ctms.requesttyperef MODIFY CONSTRAINT ck_requestflag CHECK (requestflag IN ('Billing Maintenance','Deploy','Redeploy','Account Maintenance', 'Account Service','Supplies Maintenance', 'Third Party Equipment Billing', 'Do Not Process','Customer Owned Services','Deploy Peripherals',
'Leasing Services','Convert','Internet Services','Salesperson Deploy', 'Front End Conversion'));
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
What we learned in Webroot's webinar on multi-vector protection.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

688 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