DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Constraint question - preventing same entries in different case

  1. #1
    Join Date
    Jan 2000
    Location
    Chester, England.
    Posts
    818

    Constraint question - preventing same entries in different case

    What constraint should I (or can I) use to prevent users entering 'duplicate values' in a column in different case?

    (ie) "Fred" is entered, and I want to prevent "fred" or "FRED" also being entered in the same column. Are there any kind of constraints similar to a function-based index.

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Code:
    create unique index unq_my_table on my_table (Upper(my_column));
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Jan 2000
    Location
    Chester, England.
    Posts
    818
    A function based constraint !!!

    Nice one - never, ever used one or come across one of those! I feel ashamed for my lack of knowledge!

Posting Permissions

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


Click Here to Expand Forum to Full Width