Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unique constraint with conditions?

723980Sep 23 2009 — edited Sep 23 2009
Hi all!

I have the following scenario... I need column SERIAL_NUMBER to be UNIQUE constrained but only when column STATUS = 'Y'. SERIAL_NUMBER can be non-unique when STATUS has any other value or is null. So I could en with this:

SERIAL_NUMBER | STATUS
--------------------------------------
123456789 N
123456789 N
123456789 Y

but a new row with 123456789 and 'Y' should not be allowed.

Can this be done with a UNIQUE constraint or do I have to program it in a Trigger? I've been toying with the UNIQUE constraint for a while, but neither DECODE nor WHERE clauses seem to be accepted...

Thanks in advance!
This post has been answered by 465815 on Sep 23 2009
Jump to Answer

Comments

karianna

I've pinged Geertjan who's the Netbeans product lead, hopefully he'll jump on here an answer your Q soon.

karianna

Geertjan has said to email him directly: geertjan DOT wielenga AT oracle DOT com

user4931850

Thank you, I have emailed Geertjan

Geertjan-Oracle

Thanks. Trying to find out where that NBM file is, sent you a mail in response. It is conceivable that NetBeans IDE 8.1 doesn't support that version anymore.

user4931850

This old plugin does work with NetBeans 8.1. My previous laptop has still got Netbeans 8.1 working with this plugin. I want to download the .nbm file again to install it on a new laptop.

Answer

You might try downloading the plugin here:

http://updates.netbeans.org/netbeans/updates/7.0/uc/final/certified/modules/extra/org-netbeans-modules-j2ee-sun-appsrv81…

It installs and works fine in NetBeans IDE 8.1.

Hope this helps,

--

Jiří Kovalský

NetBeans Community Manager

http://netbeans.org

Marked as Answer by user4931850 · Sep 27 2020
user4931850

Thank you

1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 21 2009
Added on Sep 23 2009
4 comments
250 views