How to generate the message

Hello world
I careate an index on table gin
Gin ON CREATE UNIQUE INDEX uk_Duplicate (sale_order_id, prod_id, color)
I have a form based on this table

What I need to iwant to show the message when the user of the same record insert means that all three fields are the same then display the message "it is already issued.

Please send me the syntax

Thank you
Vikas singhal

You will need to check the unique two-position key:

WHEN-VALIDATE-RECORD-trigger for verification during data entry and INSERT before and/or prior UPDATE for the "real" operation

Write a procedure such as:

PR_VALIDATE_RECORD IS
  CURSOR cr IS
    SELECT 1
      FROM gin
     WHERE sale_order_id=:BLOCK.SALE_ORDER_ID
       AND prod_id=:BLOCK.PROD_ID
       AND colour=:BLOCK.COLOUR
       AND (   ROWID=:BLOCK.ROWID
            OR :BLOCK.ROWID IS NULL);
  nDummy NUMBER;
BEGIN
  OPEN cr;
  FETCH cr INTo nDummy;
  IF cr%FOUND THEN
    -- show your error here
    IF SHOW_ALERT('MYALERT')=ALERT_BUTTON1 THEN
      NULL;
    END IF;
    RAISE FORM_TRIGGER_FAILURE;
  END IF;
  CLOSE cr;
END;

So call this procedure from the triggers mentioned.

Tags: Oracle Development

Similar Questions

  • How to generate the message body to call the API REST Eloqua?

    I can GET my contact details via the URL: https://secure.eloqua.com/Api/rest/2.0/data/contact/229?xsrfToken=80267e50-30db-4e16-9dd3-7d42ef75dc2d as below:

    GET the answer:

    {

    'type': 'Contact,'

    'currentStatus': 'Action pending ',.

    "id": "229."

    'converted': '1439800672 ',.

    "depth':"full. "

    « nom » : » [email protected] ",

    "updatedAt": "1440662349",

    "accountName": "Oracle."

    "address1": "333333333",

    'city': 'unknown ',.

    "country':"KR. "

    ' 'emailAddress': ' [email protected] ",

    "emailFormatPreference": "not specified."

    "fieldValues can only be:

    [

    {

    'type': 'FieldValue ',.
    'id': '100005.

    },

    {

    'type': 'FieldValue ',.
    'id': '100017.

    },

    {

    'type': 'FieldValue ',.
    'id': '100023.

    },

    {

    'type': 'FieldValue ',.
    'id': '100024.

    },

    {

    'type': 'FieldValue ',.
    'id': "100032,"
    'value': 'CZZOC000000000229 '.

    },

    {

    'type': 'FieldValue ',.
    'id': '100033.

    },

    {

    'type': 'FieldValue ',.
    'id': '100034.

    },

    {

    'type': 'FieldValue ',.
    'id': '100035.

    },

    {

    'type': 'FieldValue ',.
    'id': '100036 ".

    },

    {

    'type': 'FieldValue ',.
    'id': '100041.

    },

    {

    'type': 'FieldValue ',.
    'id': '100043.

    },

    {

    'type': 'FieldValue ',.
    'id': '100044.

    },

    {

    'type': 'FieldValue ',.
    'id': '100045.

    },

    {

    'type': 'FieldValue ',.
    'id': '100046.

    },

    {

    'type': 'FieldValue ',.
    'id': '100047'

    },

    {

    'type': 'FieldValue ',.
    'id': '100048.

    },

    {

    'type': 'FieldValue ',.
    'id': '100049.

    },

    {

    'type': 'FieldValue ',.
    'id': '100051.

    },

    {

    'type': 'FieldValue ',.
    'id': '100065.

    },

    {

    'type': 'FieldValue ',.
    'id': '100066.

    },

    {

    'type': 'FieldValue ',.
    'id': '100068.

    },

    {

    'type': 'FieldValue ',.
    "id': '100069."
    'value': 'in Europe.

    },

    {

    'type': 'FieldValue ',.
    'id': '100072.

    },

    {

    'type': 'FieldValue ',.
    'id': '100081.

    },

    {

    'type': 'FieldValue ',.
    "id': '100171."
    "value": "oracle.com.

    },

    {

    'type': 'FieldValue ',.
    "id': '100172."
    "value': 'Ken Jin."

    },

    {

    'type': 'FieldValue ',.
    'id': '100174.

    },

    {

    'type': 'FieldValue ',.
    'id': '100175'

    },

    {

    'type': 'FieldValue ',.
    'id': '100176.

    },

    {

    'type': 'FieldValue ',.
    'id': '100177.

    },

    {

    'type': 'FieldValue ',.
    'id': '100178.

    },

    {

    'type': 'FieldValue ',.
    'id': '100179.

    },

    {

    'type': 'FieldValue ',.
    'id': '100180.

    },

    {

    'type': 'FieldValue ',.
    'id': '100184.

    },

    {

    'type': 'FieldValue ',.
    'id': '100187.

    },

    {

    'type': 'FieldValue ',.
    'id': '100188.

    },

    {

    'type': 'FieldValue ',.
    'id': '100189.

    },

    {

    'type': 'FieldValue ',.
    'id': '100190.

    },

    {

    'type': 'FieldValue ',.
    'id': '100191.

    },

    {

    'type': 'FieldValue ',.
    'id': '100192.

    },

    {

    'type': 'FieldValue ',.
    'id': '100193.

    },

    {

    'type': 'FieldValue ',.
    'id': '100194.

    },

    {

    'type': 'FieldValue ',.
    "id': '100195."
    'value': 'KenJinL888MJ '.

    },

    {

    'type': 'FieldValue ',.
    'id': '100196.

    },

    {

    'type': 'FieldValue ',.
    'id': '100197.

    },

    {

    'type': 'FieldValue ',.
    "id': '100198."
    'value': 'unknown '.

    },

    {

    'type': 'FieldValue ',.
    "id': '100199."
    'value': '66.0000.

    },

    {

    'type': 'FieldValue ',.
    "id': '100200."
    ' 'value': ' [email protected] "

    },

    {

    'type': 'FieldValue ',.
    "id': '100201."
    'value': 'female '.

    },

    {

    'type': 'FieldValue ',.
    'id': '100202.

    },

    {

    'type': 'FieldValue ',.
    "id': '100203."
    'value': 'Energy & Utilities '.

    },

    {

    'type': 'FieldValue ',.
    "id': '100204."
    'value': '0.0000 '.

    },

    {

    'type': 'FieldValue ',.
    "id': '100205."
    'value': '0.0000 '.

    },

    {

    'type': 'FieldValue ',.
    "id': '100206 Uganda."

    },

    {

    'type': 'FieldValue ',.
    'id': '100207.

    },

    {

    'type': 'FieldValue ',.
    'id': '100208.

    },

    {

    'type': 'FieldValue ',.
    'id': '100209.

    },

    {

    'type': 'FieldValue ',.
    'id': '100210.

    },

    {

    'type': 'FieldValue ',.
    'id': '100211.

    },

    {

    'type': 'FieldValue ',.
    "id': '100212."
    'value': "day 1".

    },

    {

    'type': 'FieldValue ',.
    "id': '100213."
    'value': 'Purple '.

    },

    {

    'type': 'FieldValue ',.
    "id': '100214."
    'value': 'unknown '.

    },

    {

    'type': 'FieldValue ',.
    'id': '100215.

    },

    {

    'type': 'FieldValue ',.
    'id': '100216.

    },

    {

    'type': 'FieldValue ',.
    'id': '100217.

    },

    {

    'type': 'FieldValue ',.
    "id': '100218."
    'value': '1.0000.

    },

    {

    'type': 'FieldValue ',.
    'id': '100219.

    },

    {

    'type': 'FieldValue ',.
    "id': '100220."
    'value': 'Purple '.

    },

    {

    'type': 'FieldValue ',.
    "id': '100221."
    'value': 'school '.

    },

    {

    'type': 'FieldValue ',.
    "id': '100222."
    'value': "don't like".

    },

    {

    'type': 'FieldValue ',.
    'id': '100223.

    },

    {

    'type': 'FieldValue ',.
    'id': '100224.

    },

    {

    'type': 'FieldValue ',.
    'id': '100225.

    },

    {

    'type': 'FieldValue ',.
    "id': '100226."
    "value':" ' 0 - 5 hours/week ""

    },

    {

    'type': 'FieldValue ',.
    'id': '100227.

    },

    {

    'type': 'FieldValue ',.
    "id': '100228."
    'value': 'PC '.

    },

    {

    'type': 'FieldValue ',.
    "id': '100229."
    "value':" ' 0 - 5 hours/week ""

    },

    {

    'type': 'FieldValue ',.
    'id': '100230.

    },

    {

    'type': 'FieldValue ',.
    'id': '100231.

    },

    {

    'type': 'FieldValue ',.
    'id': '100232.

    },

    {

    'type': 'FieldValue ',.
    'id': '100233.

    },

    {

    'type': 'FieldValue ',.
    "id': '100234."
    'value': '0.0000 '.

    },

    {

    'type': 'FieldValue ',.
    'id': '100235.

    },

    {

    'type': 'FieldValue ',.
    'id': '100236.

    },

    {

    'type': 'FieldValue ',.
    "id': '100237."
    'value': '2 '.

    },

    {

    'type': 'FieldValue ',.
    'id': '100238'

    },

    {

    'type': 'FieldValue ',.
    'id': '100239.

    },

    {

    'type': 'FieldValue ',.
    'id': '100240.

    }

    ],

    "FirstName": "Ken."

    'isBounceback': 'false. '

    'isSubscribed': 'true ',.

    'Name': 'Jin ',.

    'subscriptionDate': '1439800672 '.

    }

    However, I get an error response if I want to update my contact information via a call to POST the URL: https://secure.eloqua.com/Api/rest/2.0/data/contact?xsrfToken=80267e50-30db-4e16-9dd3-7d42ef75dc2d

    For example: update my "lastName" to "Kim" current value "Jin".

    POST request: <-I think it's a bad Message body that I don't know the correct format... Almost of the Eloqua REST API documents mentioned on GET rather than POST.

    {"id": "229",}

    ' 'emailAddress': ' [email protected] ",

    {'Name': 'Kim'}


    POST reply:

    [{'type' ": 'ObjectValidationError',' container': {'type': 'ObjectKey', 'objectType': 'Contact'}, 'ownership':"emailAddress","requirement": {'type': 'UniquenessRequirement', 'uniquenessScope': 'global'}, 'value' ': ' '[email protected]'}]

    Could someone tell me how to build a correct Message to the body?  Using the above example (updated an existing contact name) would be much better. Thank you!

    A POST is used to create new records in the database of Eloqua.  If you want to update an existing record, you want to use a call PUT.

  • How to stop the message appearing?

    Whenever I try to preview my site in the browser, I get the following message. I try to use bearings disjoint - that's what generated the message? How to disable this message or stop her appearing?

    "To help protect your security, Internet Explorer stopped this site from installing an ActiveX control on your computer. Click here for options. »

    http://www.Projectseven.com/support/answers.asp?id=153

  • How to remove the message "not using current Version" boring?

    For months, my Firefox home page included a note that I do not have the latest version and provides a link to update. When I use the link I said "Congratulations, you are using the latest version." Adding insult to injury, there are not 20 minutes, I downloaded 27, and the message is still there. Almost the end of the world, but at this point, it is very annoying. How to remove the message?

    The old page of Google-Firefox has not changed since Firefox 4 is released, please disregard the information updated on this page.

  • How to generate the report on rules

    How to generate the report on rules with id recipient and with a few keyoword in a rule.

    The rule management dashboard has an integrated 'report rules', you can configure properties and input parameters.

    For rule management dashboard, click homes > Administration > rules. In the upper right, next to the date and time, click reports.

    You can also find these helpful videos: http://edocs.quest.com/foglight/5610/Foglight_Reports_videos.php

    Hope this helps,

    Shay

  • When you type an e-mail, I think I hit the 'Save as draft' button by mistake. Now I can't find how to retrieve the message. Any suggestions?

    I was typing an email and press the 'Save as draft' button by mistake. Now I don't know how to recover the message. Any suggestions for anyone?

    Or in the menu button, there should be an option "folders." Look for the drafts folder.

  • How to open the message app and past email address to send a new email

    I'm looking for a way how to open the message application to create a new email and the definition of the field emailaddress my application programmatically.

    I think that this should be possible, but it seems that I have did not use keywords to find it on goolge or this forum.

    any ideas?

    http://www.BlackBerry.com/developers/docs/6.0.0api/NET/RIM/BlackBerry/API/invoke/invoke.html#invokeA... net.rim.blackberry.api.invoke.ApplicationArguments)

    with

    http://www.BlackBerry.com/developers/docs/6.0.0api/NET/RIM/BlackBerry/API/invoke/MessageArguments.ht...

    specify what you want to be pre-set in the subject of the message

  • How to get the message to debug all to running page request OFA?

    Hello

    How to get the message to debug all to running page request OFA? do not use JDeveloper

    Thank you

    Renon,

    this.writeDiagnostics will be work AM and not CO. You mentioned that your code is AM, which is why I give (this.writeDiagnostics).

    You get an error when you use what to ? AM

    in CO, you must use pageContext. writeDiagnostics();

    You don't need to put any profile (other than DNF: Diagnostics), you just need to go to the Diagnostics - select the log on screen and choose the level that you used in the writeDiagnostics method.

    See you soon

    AJ

  • How to generate the alert when pageitem move on the page? and what class boss be use to move pageitem

    How to generate the alert when pageitem move on the page? and what class boss be use to move pageitem

    Hi Philippe,.

    You can see the kDocBoss for the ClassID with the PMIID IID_ITRANSFORM_DOCUMENT kLocationChangedMessage.

    Markus

  • How to generate the array Diagnostic Utility ADU for Esxi server

    How to run Diagnostic Utility ADU or HP Insight Diagnostics HP Insight Diagnostics table to collect the status tables and logs data FRO an Esxi Server

    How to generate the array Diagnostic Utility ADU for Esxi server

    Example:

    Download the package .vib here: http://vibsdepot.hp.com/hpq/feb2013/esxi-5x-vibs/hpacucli/hpacucli-9.40-12.0.vib

    and place it on a store of data seen by the host...

    Install it using the CLI:

    software esxcli vib install d vmfs/volumes //hpacucli-9.40-12.0.vib

    Now run it:

    ~ # cd/opt/hp/hpacucli/bin

    / opt/HP/hpacucli/bin # . / hpacucli

    HP Array Configuration Utility CLI 9.40.12.0

    Detection of controllers... Fact.

    Type 'help' for a list of supported commands.

    Type "exit" to close the console.

    => ctrl all diag file=/tmp/my_ADUreport.zip ris = on = on zip xml = on

    Generation of diagnostic report... done

    -Online output

    / opt/HP/hpacucli/bin #.

    my_ADUreport.zip in / tmp can now be downloaded from the host...

    It could be that useful...

    / Rubeck

  • How to activate the message window to run from published resources

    HI -.

    Can someone tell me how to activate the message window, or something similar, to executing the script trace published resources.

    While I can use the message of the Director IDE window, what I want to do is use it when I execute scripts in time real (published resources).

    So my question is confused or upset the terminology, I apologize.

    I am very new to the use of Director (11.5).

    Thank you very much.

    Bob

    You can consult the help file of the Director for more details (minimum). You will see output in the message window when your code runs a statement 'put' (or 'trace'). However, you can use it as you would the application Message window by execute arbitrary code when you press ENTER at the end of a statement (without comment).

    Your whole project works like a projector or in Shockwave (in a browser)?

  • How to format the message in the response

    Hi all

    Please let me know how to format the message in the response.
    Sorry this is not the case associated with sql, plsql. I went in the way of asking questions in the forums oracle instructions. But I did not find. Help, please...

    I know this: when I write my thread I use
    .. to format  the code ,but while replying how to include post with formatted text. 
    
    
    Thanks,
    P prakash                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    >

    Thanks for the reply, I would like to know how you included the message formatted in your answer.
    Please let me know this...

    Hi again Prakash,

    Easy - just put ">"at the beginning lines you want to quote. "

    That is higher and space - when you answer, hit the double quotes in the bar
    at the top of the post - last symbol to the right and it will be automatically
    the post to which you want to reply.

    HTH,

    Paul...

  • How to generate the sequence Island-1, -1, 1, 1...

    How to generate the sequence Island-1, -1, 1, 1...

    This seems to work:

    create sequence sss start with -1 increment by 2 minvalue -1 maxvalue 1 cycle nocache;
    
  • How to generate the ddl for unlimited quota

    Hi all

    DB: Oracle 9.2.0.4
    OS: Solaris 8

    I have a 12 tablespaces and 18 users of the application.
    I would like to grant an unlimited quota for all users on all areas of storage, to find out how to generate the ddl script.

    ex: change the dataagent user quota unlimited on DSOM.

    can anyone help us.
    Thank you
    KK.

    All users in all areas of storage?

    Select "edit user" | user name | "quota unlimited on | nom_tablespace | ';'
    from dba_users cross join dba_tablespaces
    When not in dba_tablespaces.tablespace_name ('SYSTEM', "SYSAUX");

    Please, be careful with this

    HTH
    Antonio NAVARRO

  • How to generate the script to insert data tables present in a

    How to generate the script to insert data from one table in an entire schema under environment sqlplus




    with toads it please help me please!

    905310 wrote:
    How to generate the script to insert data from one table in an entire schema under environment sqlplus
    with toads it please help me please!

    The correct method by using the pump of the database or import/export or unload the data in CSV format for loading using SQL * Loader.

    Generate instructions insert with literals is very bad choices - the bind variable is missing. It will be quite slow because many other CPU cycles are spend on hard analysis. The shared pool will become fragmented. This can cause errors of memory for other applications when they attempt to analyze SQLs for cursors.

Maybe you are looking for

  • Cannot connect in iMessage

    I've recently updated to iOS 9.3.4 and I can't connect to the iMessage or FaceTime, I typed in my email and password, but it is say sign with a sign of loading. Feel free to ask questions about it if you do not understand.

  • Re: Tecra S11 - Dual boot Windows 7 and XP

    I installed Windows 7 (from the hidden to the hardrive recovery section) on my new Tecra S11. I would like to know if I can use the Windows XPrecovery media provided by Toshiba to create a dual boot Windows 7/Windows XP rather than go back to XP?

  • Satellite A60-672 and Ipod question

    For some reason, my ipod dosnt appear on my laptop, but it does on my other PC. I'm sure that all usb ports are 2.0 so I don't see why it should not work? But he dosnt mount as a removable hard drive or in iTunes. Help, please! Benji

  • E/s FPGA node

    Hi, I was wondering if the next i/o FPGA node acquires Mod1/AI0 Mod1/AI1, AI2/Mod1 and Mod1/AI3 simultaneously. I mean I don't know if they are at the same time or not.

  • XPS8700 does not recognize ULTRA II 480 G

    My Dell XPS8700 desktop computer does not recognize my Sandisk Ultra II 480 G SSD card.  I'm under Win 8.1.  The Sandisk SSD dashboard can't find the SSD drive.  It is connected to the SATA 2 port and I checked the power and SATA connectors.  Any ide