VO return at least one row

Hello
I work with JDeveloper 11.1.1.6.0.

I have a ViewObject with a ViewCritera, the criteria line returns zero or one. The result is displayed in a pop-up window. Somehow the entry field is not there. I think that it because there is no line.
Now when it returns no rows, I want to have a line clear so I could create this entry in the database.

I hope that my use case is clear enough.

Thanks in advance.

Hello

-perform vo

vo.executeQuery()

-to obtain the estimated number of lines

long rcount = vo.getEstimatedRowCount();

-If rcompte == 0 then create line otherwise do nothing

if(rcount == 0){
 //call createInsert operation
}else{/*do nothing*/}

-openpopup

 popup.show(new RichPopup.PopupHints());

hope this helps

Tags: Java

Similar Questions

  • EXTRACTVALUE returns more than one row error

    Hi gurus

    I have XML file, now I would like to write an SQL to convert tabular. Whne I try to use

    EXTRACTVALUE
    (XML_MESSAGE,
    ' / ATMWithDrawTrans/Trans/Tran/TranDate.

    I'm ExtractValue returns multiple rows. Could you please help me find a query that retrieves these sub table form.

    < ATMWithDrawTrans >
    < Trans >
    < Tran >
    < TranDate > 2001 - 09 - 10 < / TranDate >
    < amount > 105 < / amount >
    < / Tran >
    < Tran >
    < TranDate > 2002 - 03 - 10 < / TranDate >
    < amount > 105 < / amount >
    < / Tran >
    < Tran >
    < TranDate > 2002 - 09 - 10 < / TranDate >
    < amount > 104 < / amount >
    < / Tran >
    < Tran >
    < TranDate > 2003 - 03 - 10 < / TranDate >
    < amount > 104 < / amount >
    < / Tran >
    < Tran >
    < TranDate > 2003 - 09 - 10 < / TranDate >
    < amount > 103 < / amount >
    < / Tran >
    < / Trans >
    < / ATMWithDrawTrans >

    TIA

    Published by: 870046 on July 25, 2011 08:50

    XMLTable will do what you want.

    For example, assuming XML_MESSAGE is a database of XMLType column:

    select x.*
    from your_table t
       , xmltable('/ATMWithDrawTrans/Trans/Tran'
           passing t.xml_message
           columns tran_date date   path 'TranDate'
                 , amount    number path 'amount'
         ) x
    ;
    

    If your version does not support, see XMLSequence in the documentation.

  • Single - row subquery returns more than one line.

    Hi Experts

    I am faced with error

    ORA-01427: single - row subquery returns more than one line.

    MyQuery is:

    select
       TO_CHAR(T.MR_REG_DATE,'DD')                     "DATE"
       ,CASE  
         WHEN trunc((MONTHS_BETWEEN(T.MR_REG_DATE,T.MR_DOB))) between 0 and 1 THEN ' 01'||'  - ('||'0 - 1 Month)'
         WHEN trunc((MONTHS_BETWEEN(T.MR_REG_DATE,T.MR_DOB))) BETWEEN 2 AND 12 THEN ' 02'||'  - ('||'2 - 12 Months)'
         WHEN trunc((MONTHS_BETWEEN(T.MR_REG_DATE,T.MR_DOB))) BETWEEN 13 AND 60 THEN ' 03'||'  - ('||'1 - 5 Years)'
         WHEN trunc((MONTHS_BETWEEN(T.MR_REG_DATE,T.MR_DOB))) BETWEEN 61 AND 120 THEN ' 04'||'  - ('||'5 - 10 Years)'
         WHEN trunc((MONTHS_BETWEEN(T.MR_REG_DATE,T.MR_DOB))) > 120 then ' 05'||'  - ('||'> 10 Years)'
        END age
      ,count(T.Mr_Code) No_of_Patient
      ,(  SELECT count(x.mr_code) mr_code
             FROM HMIS_MRINFO X
             where X.mr_reg_date between &FRM_DATE AND &TO_DATE
               and X.mr_code NOT in (select Y.mr_code from hmis_pat_add_dis_detail Y
                                      WHERE Y.mr_reg_date between &FRM_DATE AND &TO_DATE
                                    )
            GROUP BY CASE  
                       WHEN trunc((MONTHS_BETWEEN(X.MR_REG_DATE,X.MR_DOB))) between 0 and 1 THEN ' 01'||'  - ('||'0 - 1 Month)'
                       WHEN trunc((MONTHS_BETWEEN(X.MR_REG_DATE,X.MR_DOB))) BETWEEN 2 AND 12 THEN ' 02'||'  - ('||'2 - 12 Months)'
                       WHEN trunc((MONTHS_BETWEEN(X.MR_REG_DATE,X.MR_DOB))) BETWEEN 13 AND 60 THEN ' 03'||'  - ('||'1 - 5 Years)'
                       WHEN trunc((MONTHS_BETWEEN(X.MR_REG_DATE,X.MR_DOB))) BETWEEN 61 AND 120 THEN ' 04'||'  - ('||'5 - 10 Years)'
                       WHEN trunc((MONTHS_BETWEEN(X.MR_REG_DATE,X.MR_DOB))) > 120 then ' 05'||'  - ('||'> 10 Years)'
                      END 
      ) Missing_MR
    from hmis_mrinfo T,hmis_pat_add_dis_detail M
    where T.mr_code = M.mr_code(+)
      and T.mr_reg_date between &FRM_DATE AND &TO_DATE
      &AGE_GRP
    GROUP BY T.MR_REG_DATE
             ,CASE  
               WHEN trunc((MONTHS_BETWEEN(T.MR_REG_DATE,T.MR_DOB))) between 0 and 1 THEN ' 01'||'  - ('||'0 - 1 Month)'
               WHEN trunc((MONTHS_BETWEEN(T.MR_REG_DATE,T.MR_DOB))) BETWEEN 2 AND 12 THEN ' 02'||'  - ('||'2 - 12 Months)'
               WHEN trunc((MONTHS_BETWEEN(T.MR_REG_DATE,T.MR_DOB))) BETWEEN 13 AND 60 THEN ' 03'||'  - ('||'1 - 5 Years)'
               WHEN trunc((MONTHS_BETWEEN(T.MR_REG_DATE,T.MR_DOB))) BETWEEN 61 AND 120 THEN ' 04'||'  - ('||'5 - 10 Years)'
               WHEN trunc((MONTHS_BETWEEN(T.MR_REG_DATE,T.MR_DOB))) > 120 then ' 05'||'  - ('||'> 10 Years)'
              END 
    ORDER BY T.MR_REG_DATE;
    

    Please give some advice / solution.

    I think this might do it for you

    Select

    TO_CHAR (T.MR_REG_DATE, 'DD') "DATE."

    CASE

    WHEN trunc ((MONTHS_BETWEEN (T.MR_REG_DATE, T.MR_DOB))) between 0 and 1 THEN ' 01' |'.  - ('||' 0-1 month)"

    WHEN trunc ((MONTHS_BETWEEN (T.MR_REG_DATE, T.MR_DOB))) BETWEEN 2 AND 12 THEN ' 02' |'.  - ('||' 2-12 months)"

    WHEN trunc ((MONTHS_BETWEEN (T.MR_REG_DATE, T.MR_DOB))) BETWEEN 13 AND 60 THEN ' 03' |'.  - ('||' 1-5 years)"

    WHEN trunc ((MONTHS_BETWEEN (T.MR_REG_DATE, T.MR_DOB))) BETWEEN 61 AND 120 THEN ' 04' |'.  - ('||' 5-10 years)'

    WHEN trunc ((MONTHS_BETWEEN (T.MR_REG_DATE, T.MR_DOB))) > 120 then ' 05' |'.  ' - ('| ' > 10 years).

    Age of the END

    count (T.Mr_Code) No_of_Patient

    , count (case when t.mr_code NOT in (select Y.mr_code from hmis_pat_add_dis_detail Y))

    WHERE Y.mr_reg_date between & FRM_DATE AND & TO_DATE)

    then t.mr_code

    (end) Missing_MR

    of hmis_mrinfo T, hmis_pat_add_dis_detail M

    where T.mr_code = M.mr_code (+)

    and between T.mr_reg_date & FRM_DATE AND & TO_DATE

    & AGE_GRP

    T.MR_REG_DATE GROUP

    CASE

    WHEN trunc ((MONTHS_BETWEEN (T.MR_REG_DATE, T.MR_DOB))) between 0 and 1 THEN ' 01' |'.  - ('||' 0-1 month)"

    WHEN trunc ((MONTHS_BETWEEN (T.MR_REG_DATE, T.MR_DOB))) BETWEEN 2 AND 12 THEN ' 02' |'.  - ('||' 2-12 months)"

    WHEN trunc ((MONTHS_BETWEEN (T.MR_REG_DATE, T.MR_DOB))) BETWEEN 13 AND 60 THEN ' 03' |'.  - ('||' 1-5 years)"

    WHEN trunc ((MONTHS_BETWEEN (T.MR_REG_DATE, T.MR_DOB))) BETWEEN 61 AND 120 THEN ' 04' |'.  - ('||' 5-10 years)'

    WHEN trunc ((MONTHS_BETWEEN (T.MR_REG_DATE, T.MR_DOB))) > 120 then ' 05' |'.  ' - ('| ' > 10 years).

    END

    ORDER BY T.MR_REG_DATE;

  • Acrobat Pro XI form: at least one of the six boxes is required to check

    Hello

    I have created a form using Adobe Acrobat Pro XI.

    On a part of the form, there are 6 different boxes in a row, which at least one is required to check.

    There is some javascript that I can use, so that when a user accesses to the textfield object after the boxes to check, he won't let them go further, until they go back and check one of the boxes?

    Or, if I can't have that... a javascript code that will allow them not ' ' the form if one of the boxes is unchecked?

    I'd appreciate any help.

    Thank you.

    The first is problematic and I would not sue it.

    The latter is possible, but requires the use of a script to measure. An easy way to do this is to create a (hidden) text field required with the default 'Off' value and use a script to copy the values from the boxes inside. In this way, if no value is entered, this field validation will fail.

  • You must have at least one make an element in queue in order to make

    When I need return an intro in After effects, I click on the record button, and error message: you must have at least one make a queued item to make. What should do?

    Hello

    On the same screen, click right next to "output to" where it is said "Unassigned" (Export.avi in the screenshot below) and select the location where you want to export & Save the output.

    Kind regards

    Navdeep Pandey

  • A row of Sub query returns more than 1 row!

    I'm trying to update the values in one table from another table and get the error: void line query returns More Than 1 row.

    I want to PRV_NAME B chart updated in the table A PRV_NAME where A.PRVID = B.PRVID where B.PRV_TYPE = M"

    The two paintings were all unique PRVID, however, table B has PRVID that have the same name. So the data in table B can look like this:

    PRVID PRV_NAME
    1234 PHOENIX MED
    1235 MED BAG
    1236 MED BAG
    1237 OVERLAND
    etc...

    So, as you can see are the unique PRVID, but not the PRV_NAME. Is this the reason why I get this error?

    I do not build the tables and have no control over what is put in them. If this is the reason for the error, is there a way to fix this?

    For reference, here's the request. Maybe there's something wrong with that?


    Update msb_prv_source ps
    Set ps.prv_name =

    (select prv00.prv00_prv_name
    of prv00_prv prv00
    Join msb_prv_source ps
    On prv00.prv00_prv_id = ps.prvid
    where prv00.prv00_prv_type = am')

    Published by: user12296489 on April 19, 2013 10:46
    /* Formatted on 4/19/2013 2:00:43 PM (QP5 v5.185.11230.41888) */
    MERGE INTO msb_prv_source a
         USING (SELECT *
                  FROM prv00_prv
                 WHERE prv00_prv_type = 'M') b
            ON (a.prv00_prv_id = b.prvi)
    WHEN MATCHED
    THEN
       UPDATE SET a.prv_name = prv00_prv_name
    
  • validate if the user has entered at least one element of the page

    The apex Version: Application Express 4.1.0.00.32
    Web browser: Internet Explorer 8
    Oracle DB: 11g Enterprise Edition Release 11.2.0.1.0

    Is there a way to validate whether a user has entered at least one item on a form?

    I have a function:
    function hasPageValues return a Boolean value
    is
    Boolean v_item_found: = false;
    Start

    for rITM in
    (select nom_element
    of apex_application_page_items
    where application_id = Apex_Application.g_flow_id
    and page_id = Apex_Application.g_flow_step_id
    )
    loop
    -the element's value
    If v (rITM.item_name) is not null then
    v_item_found: = true;
    end if;
    end loop;

    Return v_item_found;
    end hasPageValues;

    I call this function returning a Boolean in my posting of the page. It doesn't seem to work. It always returns false. What am I missing and is there a better way to do this type of validation. Sorry I'm new to APEX. Thank you very much!

    SmV says:
    Also, I added the part output in the above code and it still does not work. Always returns false.

    When you have a problem in the APEX you can use debug mode to trace what actually demand. It is advisable to include the code of instrumentation in your program units that will generate useful debugging information. To do this, use apex_debug_message API:

    create or replace function hasPageValues (
        p_app_id  in pls_integer
      , p_page_id in pls_integer)
      return boolean
    is
      v_item_found boolean := false;
    begin
    
      for rITM in (
        select
                  item_name
                , display_as
        from
                  apex_application_page_items
        where
                  application_id = p_app_id
        and       page_id = p_page_id)
      loop
        apex_debug_message.log_message(rITM.item_name || ' (' || rITM.display_as || '): ' || v(rITM.item_name));
        -- does the item have a value
        if v(rITM.item_name) is not null
        then
          apex_debug_message.log_message(rITM.item_name || ' is not null: exit.');
          v_item_found := true;
          exit;
        end if;
      end loop;
    
      apex_debug_message.log_message('hasPageValues = ' || case when v_item_found then 'TRUE' when not(v_item_found) then 'FALSE' else null end);
    
      return v_item_found;
    
    end hasPageValues;
    

    Without data in the page, this gives the following debug trace:

    ...
    0.19096     0.00084     Perform custom validations:
    0.19180     0.00081     ...Validation "hasPageValues" - Type: FUNC_BODY_RETURNING_BOOLEAN
    0.19261     0.09948     ...Execute Statement: declare function x return boolean is begin return hasPageValues(:app_id, :app_page_id); return null; end; begin wwv_flow.g_boolean := x; end;
    0.29213     0.00144     P6_PRODUCT_IMAGE (File Browse...):
    0.29352     0.00082     P6_IMAGE (Display Only):
    0.29434     0.00075     P6_PRODUCT_ID (Hidden):
    0.29509     0.00105     P6_PRODUCT_NAME (Text Field):
    0.29614     0.00083     P6_PRODUCT_DESCRIPTION (Textarea):
    0.29697     0.00104     P6_CATEGORY (Radio Group):
    0.29801     0.00151     P6_PRODUCT_AVAIL (Radio Group):
    0.29952     0.00079     P6_LIST_PRICE (Number Field):
    0.30030     0.00071     hasPageValues = FALSE
    0.30102     0.00066     ......Did NOT pass
    0.30168     0.00080     Add error onto error stack
    0.30249     0.00079     ...Error data:
    0.30327     0.00299     ......message: Page has no values
    

    While with a set of element values, we get:

    0.07573     0.00107     Perform custom validations:
    0.07680     0.00094     ...Validation "hasPageValues" - Type: FUNC_BODY_RETURNING_BOOLEAN
    0.07774     0.00231     ...Execute Statement: declare function x return boolean is begin return hasPageValues(:app_id, :app_page_id); return null; end; begin wwv_flow.g_boolean := x; end;
    0.08005     0.00105     P6_PRODUCT_IMAGE (File Browse...):
    0.08109     0.00077     P6_IMAGE (Display Only):
    0.08187     0.00094     P6_PRODUCT_ID (Hidden):
    0.08281     0.00074     P6_PRODUCT_NAME (Text Field):
    0.08354     0.00087     P6_PRODUCT_DESCRIPTION (Textarea):
    0.08442     0.00072     P6_CATEGORY (Radio Group):
    0.08514     0.00067     P6_PRODUCT_AVAIL (Radio Group): Y
    0.08581     0.00112     P6_PRODUCT_AVAIL is not null: exit.
    0.08693     0.00076     hasPageValues = TRUE
    

    The two that appear to be the expected behaviours. What happens when you do this?

  • Returns all of the rows matched and unmatched table

    Hello:
    I have a table that have senders A, B and D. This is my script that returns all the shippers have those amounts:

    Select sender,
    flat amount
    from TABLE1
    where the sender in ('A', ' B', 'C', ' d ', 'E')
    Group by sender
    order of the sender

    Amount of the sender
    -------------------------
    A 10
    B 40
    D 50

    But I need the output as below:

    Amount of the sender
    -------------------------
    A 10
    B 40
    A r
    D 50
    E 0

    Can someone help me?

    Thanks for advance/Razin

    Hi, Razin,

    Outer join a table (or, as in the example below, as a result set) which contains a line for each sender you want displayed to your actual table, like this:

    WITH     all_senders     AS
    (
         SELECT  'A' AS sender  FROM dual  UNION ALL
         SELECT  'B'                FROM dual  UNION ALL
         SELECT  'C'                FROM dual  UNION ALL
         SELECT  'D'                FROM dual  UNION ALL
         SELECT  'E'                FROM dual
    )
    SELECT       a.sender
    ,       NVL ( SUM (t.amount)
               , 0
               )               AS total_amount
    FROM                 all_senders  a
    LEFT OUTER JOIN      table1           t  ON   a.sender  = t.sender
    GROUP BY  a.sender
    ;
    

    If you would care to post CREATE TABLE and INSERT statements for your sample data, and then I could test this.

    You already have a lookup table that contains one row for each possible sender. If so, you can use it instead of the above subquery. (If you do not already have such a table, think about creating one).

  • Einreihig subquery returns more than one query

    Hello

    I get the following error: einreihig subquery returns more than one request. I don't know how I should debug this application. As far as I know, subqueries can return only 1 row...: S

    I've only Oracle SQL Developer to run/test of my queries. I can run the query with ROWNUM < 5000, which gives no error. If I run with ROWNUM > 5000 and ROWNUM < 6000 then the error pops up...

    This is the query:
    with
    DATES as 
      (select (select min(REC_DATE) from STOCK) as FROM_DT, (select max(CHANGE_DATE) from STOCK_ADJUST) as TO_DT from DUAL),
    MONTHS as 
      (select add_months(trunc(FROM_DT,'MM'),ROWNUM-1) as DT from DATES connect by ROWNUM <= months_between(TO_DT, FROM_DT)+1),
    CALCULATIONS as
      (select 
        PNM.PNM_AUTO_KEY PNM_KEY,
        MONTHS.DT DT, 
        NVL((select sum(stm.qty_rec) from stock stm WHERE STM.REC_DATE < MONTHS.DT AND STM.PNM_AUTO_KEY = PNM.PNM_AUTO_KEY GROUP BY pnm_auto_key),0) INCOMING, 
        NVL((select sum(saj.qty_adj) from stock_adjust saj 
                                    inner join stock stm on saj.stm_auto_key = stm.stm_auto_key 
                                    inner join parts_master pnm on stm.pnm_auto_key = pnm.pnm_auto_key where SAJ.CHANGE_DATE < MONTHS.DT AND STM.PNM_AUTO_KEY = PNM.PNM_AUTO_KEY group by pnm_auto_key),0) OUTGOING
      from MONTHS, PARTS_MASTER PNM)
    SELECT
      ROWNUM, CALCULATIONS.PNM_KEY PNM_AUTO_KEY, CALCULATIONS.DT COUNT_DATE,CALCULATIONS.INCOMING QTY_RECEIVED, CALCULATIONS.OUTGOING QTY_USED, (CALCULATIONS.INCOMING + CALCULATIONS.OUTGOING) QTY_BALANCE
    FROM
      CALCULATIONS;
    Published by: layout of the code user574699 on November 17, 2008 02:10

    the problem is that you use the same alias in your view online as well as in your main query in the second statement-nvl...

    HTH

  • At least one number and one letter in English are required in the password.

    At least one number and one letter in English are required in the password.

    Page of the router is not fully displayed

  • Devices on all my iCloud preferences says "this device can be used to receive codes of audit ID Apple." How can I change this if at least one, if not several, can receive the verification code?

    Devices on all my iCloud preferences says "this device can be used to receive codes of audit ID Apple." How can I change this if at least one, if not several, can receive the verification code?

    Try to go here and see if you can add them to your Apple ID.

  • I have an iPad 2 and one row of keys do not work. I forced a reboot and it has not corrected it. Any ideas?

    I have an iPad 2 and one row of keys just stopped working.  I tried to force a restart and it has not fixed the problem. Any ideas?

    If you rotate the camera in landscape mode, change the key group that will not work, in correspondence to the East of the screen does not not in portrait mode? If so, then it could very well be a hardware error. If the force restart did not work, your next troubleshooting steps would restore backup, restore to factory. Until you if you want to go too far, or all simply make an appointment at the Apple Store nearest to have the material examined.

  • HP Officejet 4500 G510g: "at least one of the cartridges has a problem"

    My printer has been works well, but all of a sudden last week the message came saying "at least one of the cartridges has a problem", so I took the two cartridges to fill them. I discovered they were already full so it wasn't the problem. I was instructed to turn off and unplug the printer, I did several times and still nothing. I bought new cartridges today and that did not help either.  All the suggestions that I could try running just to buy a new printer?

    Hello

    Please click HERE to access the procedure which should solve the problem.

  • Error: "at least one tracks is protected"when trying to burn some songs CD's favorite original

    Original title: the protected when burning music

    I hope that this question is in the right place.

    I am trying to burn some my tracks favorite original CD in my library on a blank CD, so I have all my favorites on CD one.

    The problem I'm having, is that when I start to the burn, a window appears and says... "that at least one of the tracks is protected"

    Where to look, or go to find that trace is in order to remove it, and then burn the rest?

    Thanks in advance.  :-)

    Hello

    It seems that burning rights are missing for one of the tracks.
    It's ok to burn the tracks. If CD burning rights are missing on the slopes, then you will burn successfully tracks.

    If the song file is protected by the rights of use, these rights may allow for playback of the song on the computer but prohibit burn them on a CD. If the Information button appears next to the song in the burn list, click the button to see more information on the issue. For more information on usage rights, see the DRM: frequently asked questions.

    For more information, see burn a CD or DVD in Windows Media Player: frequently asked questions

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Photosmart D110a. Error message: at least one of the cartridges has a problem.

    Photosmart D110a, Windows 7 32-bit, error message: at least one of the cartridges has a problem. Will print black if the deleted color cartridge. New cartridges does not solve the problem. Everything suggests not tried twice, cleaning, disconnect, etc..

    There is a document with the right information on how to help solve this problem located here.

    It seems that you have already made certain steps to help with this. If the printer is under warranty, then you may want to contact the HP Support on this device.

    Let me know if it helps.

Maybe you are looking for

  • Are the plugins Flash 11.1.102.55 and Java SE 6 U 29 6.0.290.11 compatible with Firefox 8 for Windows XP SP3?

    I found information leading me to believe that compatibility between Java SE6 U29 6.0.290.11 and Flash 11.1.102.55 plugins for Firefox 8. Would someone please confirm or deny the weather these plugins are compatible with Firefox 8? Thank you

  • Upgrade the hard drive in a Satellite 4100XCDT

    Hello Can someone tell me how high I can update my hard drive in a Toshiba Satellite 4100XCDT?I know he now has a 6 GB one, but I would like to know which is the most important, I can put in this machine.Any information would be appreciated. Yours si

  • Failed to install Vista Service Pack 1

    I have a hp laptop with Vista Home Premium ed. w / 32-bit operating system. I tried to load SP 1 for Vista and the following occurs. When the computer restarts after the installation it says. "Certain changes could not be made. Restoration of the cha

  • What is "Andrea ADI filters Service"? (Windows 7 64-bit)

    What is, "Andrea ADI filters Service" and what kind of boot I should assaign the services (Local) in a dc7900 convertible Can minitour running Windows 7 Ultimate 64 bit and Internet Explorer 11 as default browser - anyone help? Thank you!  Jeff

  • Driver audio Inspiron 660

    I bought an Inspiron of 660 with Windows installed 8.0 end of 2013. I upgraded to 8.1 Windows with the approval of Dell support. Leafing through the newspaper, there are some Windows last Friday updates. Since that time I had several problems with Wi