RE: Case insensitive unique constraint.

RE: Case insensitive unique constraint.

 

  

Write a trigger to do so...and raise ORA-0001

Regis

-----Original Message-----
From: Dan Petric [mailto:dan.[Email Address Removed]
Sent: 31 March 2004 07:51
To: LazyDBA.com Discussion
Subject: Case insensitive unique constraint.

Hi list.

I have a table with a primary key on a varchar column.

The requirement is to allow case sensitive storage of key values (e.q.
".NET Framework") but the unique constraint on this column must be case
insensitive, so it is not allowed to exist two records with ".NET
Framework" and ".NET FRAMEWORK", for example.

The storage in the database is made via PL/SQL, this means that a
solution is to verify before insert using upper() or lower() functions,
but if you have any other suggestions..please tell.

TIA

Dan.



*********************************************************************
This electronic transmission is strictly confidential and intended solely
for the addressee. It may contain information which is covered by legal,
professional or other privilege. If you are not the intended addressee,
you must not disclose, copy or take any action in reliance of this
transmission. If you have received this transmission in error,
please notify the sender as soon as possible.

This footnote also confirms that this message has been swept
for computer viruses.
**********************************************************************

Oracle LazyDBA home page