[ILUG] yet another sql (access) question

jac1 jac1 at student.cs.ucc.ie
Thu Jul 12 10:28:05 IST 2001


I have a table. It has a number of fields. One if these fields is called 
'ProjectName'. It is a String. Another one is called 'Date'. It is a Date. 
What I want to do is to not allow duplicate entries in the table for these two 
fields. An example to clarify:

Allowed:
========
[ProjectName] [Date]
'Project1'     5/5/2001
'Project1'     5/6/2001
'Project2'     5/5/2001
'Project2'     6/5/2001

Not Allowed:
============
[ProjectName] [Date]
'Project1'    5/5/2001
'Project1'    5/5/2001
'Project2'    5/5/2001
'Project2'    6/5/2001
(can't have two entries of 'Project1' with the date 5/5/2001)

I am using access. Is there a way of doing this without actually looking for a 
previous entry with the same project name and date before adding a new entry 
to the table?






More information about the ILUG mailing list