-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
If you're using ANSI-92 SQL (Access 2002 & above and SQL Server) you can
use this DDL statement:
ALTER TABLE table_name ADD CONSTRAINT CK_Direction CHECK (Direction In
('North', 'South', 'East', 'West'))
Otherwise, you can open the table in design view and set the column
Direction's Validation Rule property to:
In ('North', 'South', 'East', 'West')
Interestingly, when using the ALTER TABLE statement, the Check
expression doesn't appear in the table's Validation Rule property.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQfbcDIechKqOuFEgEQK6UgCfYcznLNNgi3TvHbumw0+bMb kZkQIAoLMp
PTZ8ZMymYsZduqzE8kYi407Y
=D9XG
-----END PGP SIGNATURE-----
adolph wrote:
I I've added a column to a table using a sql statement IE "ALTER TABLE
sometable ADD COLUMN Direction" Now I would like to limit the valid
entries for the field to North;East;South;West; How do I do this with
a SQL statement?