Gary J. Giever
gjgiever at myway.com
Fri Nov 3 09:27:32 CST 2006
YES! That did it. Thank you very much. Gary J. Giever, M.A. Applications Developer ACCMHS --- On Fri 11/03, Gustav Brock < Gustav at cactus.dk > wrote: From: Gustav Brock [mailto: Gustav at cactus.dk] To: accessd at databaseadvisors.com Date: Fri, 03 Nov 2006 15:42:18 +0100 Subject: Re: [AccessD] Simple SQL Statement Hi GaryTry applying a name for the index:ALTER TABLE tblClientMaster ADD CONSTRAINT IndexName UNIQUE (CCASE_NO);or:ALTER TABLE tblClientMaster ADD CONSTRAINT IndexName PRIMARY KEY (CCASE_NO);/gustav>>> gjgiever at myway.com 03-11-2006 15:12:25 >>>I'm setting up a program that must make a copy of a table (dbo_CLIENTMAST)in a different application then make one of the fields in the new table a primary key. Making the copy is easy but changing the field to a primary key is causing me some problems. I've tried various SQL statements but none have worked. This is my last attempt and it seems like it should work but I get the message "Syntax error in CONSTRAINT clause." tblClientMaster is the new table.ALTER TABLE tblClientMaster ADD CONSTRAINT UNIQUE (CCASE_NO);Any help would be much appreciated.Gary J. Giever, M.A.Applications DeveloperACCMHS-- AccessD mailing listAccessD at databaseadvisors.comhttp://databaseadvisors.com/mailman/listinfo/accessdWebsite: http://www.databaseadvisors.com _______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.com