How to ensure that certain information is not duplicated in a table

Hello

I have a table 'demand' with columns < person and status >. Now I can have any number of records in this table for a particular person, but not more than 1 with status = pending.

Can someone help me on this.
CREATE UNIQUE INDEX one_pending_status
   ON request( (CASE WHEN status = 'PENDING' THEN person ELSE NULL END) );

This takes advantage of the fact that Oracle indexes not NULL values. If the index will be only an entry for an individual if the status is pending.

Justin

Tags: Database

Similar Questions

  • How to ensure that simultaneous usage will not corrupt data

    Hello

    i ' am, developing financial application that will have cca. 600 concurrent users.
    My poor table presentation that holds financial data is

    Date J C balance
    1 10.01.2010 10 0 10
    2 12.01.2010 20 0 30
    3 12.01.2010 70 0 100
    4 12.01.2010 0 15 75
    5 12.10.2010 0 25 50
    6 12.10.2010 200 0 250

    Very important column is the Balance that is recalculated at each insertion. So if insert us a line between the first and second rows, it would be like this:

    Date J C balance
    1 10.01.2010 10 0 10
    -> 500 0 510 10.01.2010
    2 12.01.2010 20 0 530
    3 12.01.2010 70 0 600
    4 12.01.2010 0 15 575
    5 12.10.2010 0 25 550
    6 12.10.2010 200 0 750

    Problem is when two users at the same time wants to insert a new line. In my example if they want to insert a date line 10.01.2010 each of them would get previous balance 10,00. And we mistake in the balance.

    Date J C balance
    1 10.01.2010 10 0 10
    -> 500 0 510 10.01.2010
    -> 200 0 210 10.01.2010
    2 12.01.2010 20 0 230
    3. ...

    How can I ensure that it won't happen. Help, please.

    Kind regards
    Igor

    I think that per query is much better, because

    -There will be no impact on performance when inserting
    -No locking while insertion
    -the data will be always compatible

  • 18 Firefox now prints a page using extended fonts so that the information will not fit on an A4 page. How can this be repaired?

    When you try to print a page as a bank statement, Firefox 18 prints now in a large font size so that the information does not fit into the page (A4). Previously, there was no problem and the information printed exactly as on the screen. There is no problem when printing from Google Chrome. In previous versions of Firefox, there is no problem. What has changed and how it can be corrected?

    See:

    Try to adjust the print scale: file > Page Setup > "Format & Options": scale (deselect: "Shrink to fit page width")

  • How to ensure that my computer has microphones and then use them for talking to Cortana?

    How to ensure that my computer has microphones and then use them for talking to Cortana?

    Hi Walter,

    Please start by http://windows.microsoft.com/en-us/windows-10/cortana-privacy-faq

    Also, try to review this tutorial: http://www.tenforums.com/tutorials/4026-cortana-turn-off-windows-10-a.html

    They should help you get started.  Problems specific to the micro (existence, activation, volume,...) will be addressed (more than the troubleshooting steps if Cortana doesn't) that you go through the above; However, a "one-stop-shop" for microphones & recognition recording & speech covering all peripheral aspects are versatile control panel page (see the path in the blue header at the top of the screenshot pictured below for W10Pro 11102).

    Best wishes

    Kosh

  • LTR6.2.1: import function: I imported the 4 JPGs from my iphone. the photos were black. After a while, I found that I had read in the metadata and then had the photos. How to ensure that the metadata is read in the always?

    LTR6.2.1: import function: I imported the 4 JPGs from my iphone. the photos were black. After a while, I found that I had read in the metadata and then had the photos. How to ensure that the metadata is read in the always?

    1. Turn off apply tone auto under Lightroom preferences settings
    2. Restart Lightroom and then import images again.
  • How to ensure that "" is not creating a studio ODI data store. ?

    Hi Expertise,

    While I creates a store of DATA (TABLE) in the studio of the ODI, I have created a table name with quotes Double for the table as example 'TABLE_NAME'.

    Is there a method to get rid of this. ?
    At the studio of ODI, it does not show the name of the table with the quotes, but when I'm trying to see a TOAD, I get the quotes.

    Can someone help me on this. ?
    I can't do "' to the table I create in the studio of ODI.

    Thank you

    Shakur

    Hi Shakur,

    Go to the topology-> Oracle technology-> language (tab)-> delete quotes under object delimiter, and advance to the next field to ensure that the change is made, then save.

  • How to check that the variable 'does not contain' value?

    Hello

    I use CP 7.0.1.237.

    We want to use the widget text box for a custom quiz and verify a response. While we understood how to check the existence of certain key words, we are not able to find a way to check that the content does NOT contain certain keywords. For example, we want to ensure that the text entered in this widget does not contain a "Transformation" and "Non-compliant.

    Is this possible at all?

    Thank you

    Anthony

    Anthony, it works perfectly. Created this conditional action with 4 decisions. I used the interaction of training text scrolling in CP8 (because now you can control the variable - which means I might have a Reset button):

    First decision:

    Second decision (the third is similar to the following)

    Fourth and final decision

    I put the variable words (v_first... v_fifth), it's a reflex I use since I shared actions that much. The variable associated to the ETB (you can now reset an empty var in CP8) is v_TextArea and the Boolean value that will decide if positive feedback (StarOK) should be shown is v_TA_OK. If you want to display a negative feedback, put this in the ELSE part of the final decision.

    FYI: it took 15 minutes, including the creation of assets and the variables and tests. Personally I would have needed more time to do it in JS, but that's just me.

    Lieve

  • How to ensure that the graph xy plots are present?

    Hello community,

    Since the update to LabVIEW 2014 this week, I have a problem with the code that worked (or didn't, but the problem was unnoticable).

    As example the llb I created to present the question, I'm graphic xy filling with quiete some data and then color programmatically plots.

    The problem is that if there are too many plots then the property nodes that are to color the mistakes of Mr. thow plots as if the corresponding plots were not present in the graph still - even if I used a single flat sequence structure to try to ensure that the data is written in the plot before trying their color.

    Maybe this wouldn't be in LabVIEW 2013 too - but the threshold for the number of plots was higher. All I can say is that I have observed this with data sets that worked well in 2013 of LabVIEW.

    To reproduce simply run 'color of the graphs.vi' with values high enough to 'numerisch' and ' numerisch 2 "(50 on my machine can be more about yours).» I left the terminal nodes property unwired error so you get caught up in the right position when the error occurs.

    Somehow check if all parcels are in the charts again? This way I could introduce a delay that ensures that I don't have the color of the graphics that do not exist yet - regardless of the speed of the target computer.

    Xy graph behavior has changed in 2014 of LabVIEW? Or maybe his performance?

    Best regards

    Florian

    HM, your addendum somehow answered my question. We are indeed an against the user interface thread race condition.

    Unfortunately, I do not know a method to wait than the UI thread to have access to all plots. In addition, the waiting time that you need depends on the ability of the system, which is dynamic, you know not all processes background or in parallel, running applications.

    That being said, I recommend a work around:

    1. create the data for the plots

    2. how many plots you have in query data

    3 write short dummy data in the terminal, and not the data of the whole plot

    4 Recolor plots

    5. write the correct field data

    Norbert

  • How to ensure that no data is ever stored on the servers of the low COST airlines?

    In particular, I would like to use the SimpleChat and SharedWhiteboard in a secure application and will not have any data stored on the servers of LCCs (only used to manage the flow of data). At least, I don't want to have data stored between sessions, but the 'sessionDependent' of these two pods property doesn't seem to work (ie. when the value 'true' history of cats and forms of Whiteboard are preserved between sessions).

    I put in a few hooks to clear both at the end of the session and the start of a session, but what I really want, is to ensure that the data never be stored in the first place.

    Is this possible with these pods, or do I need Custom develop something on my own to support this behavior?

    Thank you

    The data are stored only in memory. When "persistent" we check the configuration node and transitional so we don't save this node on the disk.

    If you're really worried about a security breach, you should probably encrypt your messages before you send them through companies low-cost (it should be easy to subclass the current models and encrypt/decrypt points on the fly).

  • How to confirm that the machine is not a new machine

    Under normal circumstances, the FRU components must be the same and the official site. But my keyboard T530 different FRU official website, does that mean that my machine problem, not a new machine

    Since it is a grey import, then everything would be possible.

    Look for the warranty start date, when he started?

    Also, remember that this machine is an import grey, to claim the warranty you would have to follow the instructions described below.

    http://support.Lenovo.com/en_AU/detail.page?LegacyDocID=MIGR-58926

    More precisely:

    Customers requiring a function of international interest in China may be requested to provide one of the following numbers to obtain the guarantee of the IWS repair service; proof of identification of business (letter from the company, email, card, badge of the company with photo ID), proof of purchase (receipt, order, delivery note, sales memo or invoice) or proof of travel (passport with valid Visa to or from the country where the product was purchased, or other travel documents).

  • How do so that my software is not cracked the evidence?

    Hey,.

    I saw an insert on Ebay, where a person acquired licenses cs6. His description is translated:

    "- German version.

    -activation permanently

    -without abo

    -downloadversion

    -the software on a disc

    -No delivery/single collection ".

    I don't want to support crackers, but also do not have enough money to buy it directly from adobe:
    How can I prove, that series are not cracked? He said that the customer can try the programs on his (vendors) pc...

    Thank you

    Anton Kettling

    P.S. I want adobe programs as much as I can , but I only need Dreamweaver strongly. Perhaps any other ideas how I can get it for private purposes?

    Hi antonk57057579,

    eBay is not always safe and I personally would rather not buy any Adobe software - unless it is
    an authorized reseller or from Adobe itself. You can buy CS6 inherited directly from Adobe by phone
    call: http://www.adobe.com/de/products/cs6.html

    If you are a student, you can save at least 60% on the subscription ("all Apps") complete creative cloud with the
    Form of subscription "students and teachers! More information on that here: pricing and membership creative cloud plans | Adobe Creative Cloud

    Kind regards
    Maurice


    This answer was helpful? Please consider marking it as 'Useful' or 'Right answer' to help future customers with the same problem. Thank you!

  • How to ensure that the battery has a long service life?

    Hello!
    I just bought a Toshiba Satellite A80 and I was wondering how can I make sure that my battery will have a long life. It is said that the battery is achieved if it is fully charged, and used the laptop to power grid. Does this mean that I have to take my battery while I'm doing this?
    Thanks for your help!

    [Edited by: admin August 6 05 14:46]

    Hey Niji

    If you need some useful information on the battery and the other parts of your unit, you can visit the site Web of Toshiba.
    I found this site:

    http://EU.computers.Toshiba-Europe.com

    Please go to support & download, then the Knowledge Base.
    This site is very good.

    Good bye

  • How to ensure that the new RAM will be compatible with my computer?

    Hello

    I have a PC that I want to put a new RAM in. I know how to insert the RAM. But y at - it a chance it will not work and will not work.

    The PC is a desktop computer and Win XP Home. I hope that upgrade to Windows 7 if it is successful. 512 MB of ram currently.

    JK

    Kingston and have all two Crucial fairly complete memory configurators

    http://www.kingston.com/worldwide/default.asp - use the drop-down list upwards to the right called "research paper."

    http://www.crucial.com/?click=true - start with the drop down "select the manufacturer."

    You have your motherboard manual? That should tell you what memory is compatible.

    Or failing that get back to me with your motherboard brand and model or brand of PC and model and I will be able to help.

    Tricky

  • How to ensure that the binary file is stored in the location specified for my DLL files?

    I'm new to computers and has a Dell Inspiron 1545 laptop with a program in Windows Vista Home Premium on a 64-bit platform. I have a thread in my sidebar gadget new MSNBC and the dates for the stories are frozen in December of last year and does not update the current stories. I had no problem with this before and I haven't added or deleted programs because of this problem to the best of my knowledge. I got advice here on the checking of dll files and 4 of them come back with saying error messages and see that the binary is stored at the specified location for debug files. I searched for information help with this and I found a few tips that not saved and re-entered the files, I tried and different versions of the idea, at first it made no difference and then I redid it and it screwed up my weather gadgets so I redid it and they worked very well. I then tried on the DLLs for the MSNBC gadget, but it doesn't seem to change anything, although the gadget to power for the Dow Jones News feed is now screwed up. Is there a site I can go to what can explain the route of binary/specified path or debug file. Save/re seems to be the right path, it affects obviously the gadgets but not as I want, any help in this direction would be appreciated at. Meanwhile I'll go back and try again.

    Hi dumdeedumdum


    What are the files dll are facing problems with?

     

    You can perform a SFC scan and check if the problem is resolved.
    To Perform a Scan SFC -
    a. click Start, click programs, on Accessoriesprincipally made, right click guestand then click run as administrator. If you are prompted for an administrator password or a confirmation, type the password, or click on Allow.
    b. type the following command and press ENTER:
    sfc/scannow
    A message appears indicating that "the system scan will start. Be patient because the scan can take some time.
    c. If all files require a SFC replace will replace them. You may be asked to insert your Win7 DVD for this process to continue.
    d. If everything is correct you should, after the scan, see the following message "resource protection Windows not found any breach of integrity".
    e. once the scan is finished, close the command prompt window, restart the computer and check.

    Check the link below for further guidance on scan SFC - mentioned
    http://support.Microsoft.com/kb/929833

    I hope this helps.

  • How can I view other information but not number when I call a number?

    When we make a call, the screen displays "calling number(123**)". But if I hope see more details in my program, how can implement this? Any suggestion will be appreciated. Thanks in advance.

    Hello

    I'm not sure if it works, but just write an autostart user interface application, which

    will be requestForeground PhoneListener Interface (incoming call) is then

    informed! Then you could can show the screen of your own application and related

    you want to ;-)

    Kind regards

    Jochen

Maybe you are looking for