Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Alpine Califormia

    Unanswered: User Defined Rule

    I need to create a rule for when users enter in data. I need them to enter it in like this 01-0000 (the first two digits is the year we are in the last 4 are in numerical order), right now its being entered like this 01-000GC and I would like the database to force the users to enter it like 00-0000

  2. #2
    Join Date
    Dec 2007
    London, UK
    ALTER TABLE tbl ADD CONSTRAINT ck_col CHECK (col LIKE '[012][0-9]-[0-9][0-9][0-9][0-9]');

Posting Permissions

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