Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DEFAULT VALUES & RULES

Status
Not open for further replies.

dmerm

MIS
Jul 17, 2000
5
GR
Hi to all,
I wonder if there is a way to use the default values i create to a rule. For example if i define two default values to describe the status of an order (Order_Pending & Order_Served) can i use these values in a rule which will check that the status of the order will have only these two values.
Another question that i have is how can i retrieve these default values in order to use them in a SQL statement?
Thank you for your time,
Dimitris. [sig][/sig]
 
You can tighten up the checking on your tables by using ADD CONSTRAINT. As usual, check the Books On-Line (BOL) for details.

Someone else might be able to answer the question as to whether you can list the values of a constraint with a SQL statement. I'm sure that it is possible as all SQL Server db configuration is stored in the system tables. [sig]<p> <br><a href=mailto: > </a><br><a href= home</a><br> [/sig]
 
I wonder if there is a way to use the default values i create to a rule...a rule which will check that the status of the order will have only these two values.

I agree with jnicho02: what you want are not defaults but constraints. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
Dear jnicho02 and Robert,
I am aware of constraints but in this way you must assign more than one constraint per field (or Table). I have defined a User Defined Data Type and gave to it a Default Value. I want to bind this to a rule which i want to contain Default values. This is why i am asking if i can use Default values to a rule.
In my way there is no need to assign multiple constraints but only one the User Define Data type.
Anyway thank you for your time. If i find something i will let you know.
Dimitris. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top