Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002
    Posts
    22

    Unanswered: tbl design--duplicates

    am dealing with 2 tbls 1-m;
    tblEmpl(empID(pk), Fname,Lname, phon#) &
    tblTimeReport(TimeReport(pk), empID, Date, startTime, EndTime)

    how can i avoid 2 duplicate on tblTimeReport; i mean an employee can come & work the same day at differnt time, but i can enter same day, same times which is duplicate?

    am using acess so i cant use trigger, but how can i mk empid, date, stTime & end time unique?
    i added PK to all this col..didnt work.
    under tbl design on index.. i had yes, no duplicate...but still it allows duplicate value..
    any suggestion

    thanks

    mark

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    CREATE UNIQUE INDEX someindexname
    ON tblTimeReport (empid, date, startTime, EndTime)

    http://msdn.microsoft.com/library/de.../D2/S5A318.asp


    rudy
    http://r937.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •