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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field Value List 1

Status
Not open for further replies.

DataNick

Technical User
Jan 1, 2003
16
US
Hi All! I'm new to SQL Server.
Is there anyway to program list values for a field(s) for insert operations a-la MS Access field value lists?
Thanks for your help!
 
You can write a constraint or trigger to check the values. The constraint is the better choice (more efficient) unless you are doing complex processing to check the correctness of the values.

Look up constraints in Books Online.

It is also a good idea to do a check for correct values on the client side to avoid sending unnecessary traffic across the network. IN fact if I have specific values, I will put them in a lookup table that popultes a list box or combo box, so that bad values cannot be selected for data entry. The table should still have the constraint on it though, because people do occasionally enter data directly in the tables without using the user interface.

Questions about posting. See faq183-874
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top