0 Replies Latest reply on Jun 6, 2006 2:49 PM by Newsgroup_User

    how to limit inserting data according to no of values for a field

    Level 7
      Hi,

      I have a task at hand. I have a table in a database.

      When inserting a new record from webpage form in a field into my database,
      each value may repeat two or three times maximum for a specific field..

      I want a system to check if this value (e.g. : 414 from below example)
      exists twice and not more, then I do not want it to allow recording third
      time of same value. Or, for the example value of 450, I do not want the
      system to allow recording of fourth value as 450.

      In brief, the system will check number of records containing a value and its
      limit, accordingly, it will allow an additional record or it will not allow.

      Please help !

      I sense that it is easy. But, I could not figure out the logic yet

      Any solution would make my day.

      Thank you

      Hakan

      For example,

      Id Title Code
      1 John 450
      2 Abraham 414
      3 Marry 418
      4 Jennifer 414
      5 Mike 450
      6 Susan 412
      7 Jeff 450
      8 Tony 424