Need help: not prepared statement to return the value:

Hi refugees,

In LICS, prepared statement does not return any value...

This is the code...

String p_person_id = pageContext.getParameter ("person_id");

Connection Conn = pageContext.getApplicationModule (webBean) .getOADBTransaction () .getJdbcConnection ();

String payment_query = "select max (payment_date) in the xxbdf_payslip_detail_mv where assingment_id = (select assignment_id from the people_reporting_info where person_id ' + p_person_id + ') ';

PreparedStaement stmt = stmt.executeQuery ();

ResultSet rs = stmt.executeQuery ();

While ((rs! = null) & & RS.) Next

{

java.sql.Date sql_date = rs.getDate (1);

SOP (SQL_DATE)

/ * I tried this also * /.

java.util.Date util_date = rs.getDate (1);

SOP();

String string_date = rs.getString (1);

SOP();

}

and I have to format the date as "DD-MM-RRRR.

Please give your valuable suggestions refugees...

Thank you

Jaya

Jaya Hey,

Write the code below in the PR

Code for the prepared statement


String PaymentData;

String p_person_id = pageContext.getParameter ("person_id");

System.out.println ("The person Id is" + p_person_id); check the id of the person should not be null.

try {}

Connection Conn = pageContext.getApplicationModule (webBean) .getOADBTransaction () .getJdbcConnection ();

String query = "select max (payment_date) in the xxbdf_payslip_detail_mv where assingment_id = (select assignment_id from the people_reporting_info where person_id ' + p_person_id + '); '

PreparedStatement stmt = conn.prepareStatement (Query);

ResultSet = stmt. ExecuteQuery();

While (resultset.next ())

{

PaymentData = (String) resultset.getString("payment_date").toString ();

}

Conn.Commit ();

}

catch (System.Exception e)

{

e.printStackTrace ();

}

See below the Code for the Date Format Conversion


cabu.ui.validate.Formatter formatter = new OADateValidater (PaymentData, "dd-MMM-YY" "");

Thank you

Dilip

Tags: Oracle Applications

Similar Questions

  • Need help with update statement to be used in the stored procedure

    I have the following update statement and I get "ORA-06512. Someone of you can help me.

    ----
    UPDATE MO X SET X.MOMODEL = (SELECT Y.MOMODEL FROM MO Y WHERE Y.MOID = A_TEMP_INT3)
    WHERE X.MOID in (UPDATE MO X SET X.MOMODEL = (SELECT Y.MOMODEL FROM MO Y WHERE Y.MOID = A_TEMP_INT3)
    WHERE X.MOID in (A_TEMP_INT1, (select assocchild from mo_association
    Connect prior assocchild = assocparent
    Start with assocparent = A_TEMP_INT1)); (by selecting assocchild in mo_association
    Connect prior assocchild = assocparent
    Start with assocparent = A_TEMP_INT1));
    ----

    Note: A_TEMP_INT1 and A_TEMP_INT3 are the values of cursor and is assigned to numeric values in the code.


    Thanks for all the help in advance.

    Kind regards
    REDA
    WHERE X.MOID IN
     (SELECT ASSOCCHILD   FROM MO_ASSOCIATION
          CONNECT BY PRIOR ASSOCCHILD = ASSOCPARENT
         START WITH ASSOCPARENT = A_TEMP_INT1
         UNION
      SELECT A_TEMP_INT1 FROM DUAL );
    

    Should work.
    VR,
    Sudhakar B.

  • I need help to unite 2 users on the same CC account, can someone help me?

    I need help to unite 2 users on the same CC account, can someone help me?

    Since this is an open forum, not Adobe support... you must contact Adobe personnel to help
    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific time) <==> NOTE DAYS AND TIME

    Creative cloud support (all creative cloud customer service problems)
    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • Hello on the program is not working properly, please return the money to buy other best program and thank you

    Hello on the program is not working properly, please return the money to buy other best program and thank you

    A faulty program that has not been purchased Mali returned from four days

  • Need help to open two images with the same file with different exposures on the screen at the same time in the Photoshop creative cloud (in previous versions we could open two images of the same nef (raw) file and then combine them on the screen with the

    Need help to open two images with the same file with different exposures on the screen at the same time in the Photoshop creative cloud (in previous versions we could open two images of the same nef (raw) file and then combine them on the screen with the move tool. They have become a composite of two layers which could be developed further with the mask tool.

    Hello

    Please go to the preferences > workspace and uncheck the option 'open the document in the tabs '.

    Now you can click on file and choose file > open and open the two images in two different windows which can be arranged side by side.

    Thank you

  • I need help about illustrator. I have the portable version of CS6, install and won't let me open the program. I get the error: 1 I have windows 7

    I need help about illustrator. I have the portable version of CS6, install and won't let me open the program. I get the error: 1 I have windows 7

    Error code 1 is often associated with permission issues. Have you tried to install Illustrator in a new user account with admin rights? If you want to download CS6, here's how to get it through creative cloud: html http://helpx.adobe.com/creative-cloud/kb/download-previous-versions-creative-applications.

    Let us know how it goes.

    Concerning

    Stéphane

  • All my photos are displayed such as BW because somehow I saved a preset to quickly develop and it records in BW.  This is for all of my photos.  Individually, I can cancel their but did need help how to get rid of the pre-selection, so he's going to defau

    All my photos are displayed such as BW because somehow I saved a preset to quickly develop and it records in BW.  This is for all of my photos.  Individually, I can cancel their but need help how to get rid of the preset then all photos of goes to Default or in the shot. Thank you

    Go to the develop module and highlight all the images in the film at the bottom of the screen. Enable automatic synchronization, and then click the reset button. To reset all the images in your camera default settings.

  • Returns the value of column line

    Greetings!  I currently have a request we will tell

    SELECT value, period FROM MAS_CFUS_KEYACM_CONTROLDATA ORDER BY cf_keyword_ID

    RESULTS

    Period value

    --------------------------

    100.0002 1 JANUARY 14

    -35.68 1 DECEMBER 14

    -1943.67 NOVEMBER 1, 14

    678.0013 OCTOBER 1, 14

    This continues for about 15 results by cf_keyword_ID.

    I'm looking to return the VALUE first in a new column called PREV1, the second value of PREV2, third in PREV3 and so on.  The same goes for the dates.  And all this for only the first 10 values of each cf_keyword_ID.  Can anyone suggest the best way to achieve this?

    Thank you!!

    Hello

    This is called pivoting.  Because I don't have a copy of your table test, I'll use scott.emp to illustrate.

    This shows the first 3 employees for each job, in order by hiredate, along with their hiredates:

    WITH relevant_data AS

    (

    SELECT ename, job, hiredate

    row_number () taken OVER (PARTITION OF work

    ORDER BY hiredate

    ) AS r_num

    FROM scott.emp

    )

    SELECT *.

    OF relevant_data

    PIVOT (MIN (ename) AS ename

    MIN (hiredate) AS hiredate

    FOR r_num (1, 2, 3)

    )

    ORDER BY job

    ;

    Output:

    WORK 1_ENAME 1_HIREDATE 2_ENAME 2_HIREDATE 3_ENAME 3_HIREDATE

    --------- ---------- ----------- ---------- ----------- ---------- -----------

    ANALYST FORD 3 December 1981 SCOTT April 19, 1987

    The CLERK SMITH December 17, 1980, 3 December 1981 JAMES MILLER January 23, 1982

    MANAGER JONES 2 April 1981 BLAKE 1 May 1981 CLARK June 9, 1981

    PRESIDENT KING November 17, 1981

    SELLER ALLEN 20 February 1981 WARD 22 February 1981 TURNER 08-Sep-1981

    There are actually more than 3 SECRETARIES and SALESMEN.  Which does not cause an error; the only first 3 are shown.

    As you can see, having less of 3 does not cause any errors, either.

    For more info on pivots, see the FAQ of the Forum:

    Re: 4. How can I convert rows to columns?

    I hope that answers your question.

    If this isn't the case, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.

    Explain, using specific examples, how you get these results from these data.

    If yod post rather a problem using scott.emp, then you need not display the sample data; just results and explanations.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum:

    Re: 2. How can I ask a question in the forums?

  • XML - ORA-19025: EXTRACTVALUE returns the value of a single node

    Hello

    I'm new to XML DB. Can someone help me with the below XML

    I use the following XML... (I pasted a part only of it coz I need data only up to this article)

    XML
    --------------------

    <? XML version = "1.0" encoding = "UTF-8"? > < SOAP - ENV:Envelope xmlns:SOAP - ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-."
    example"container ="http://www.w3.org/2001/XMLSchema"> < SOAP - ENV:Body >
    < ns:PicklistWS_GetPicklistValues_Output xmlns:ns = "urn: crmondemand/ws/list dropdown /" >
    < ListOfParentPicklistValue xmlns = "urn: / xml/crmondemand/list of choices" >
    < ParentPicklistValue >
    < language > ENU < / language >
    < ParentFieldName > plProduct_Team < / ParentFieldName >
    < ParentDisplayValue > Marketing On Demand < / ParentDisplayValue >
    < ParentCode > Marketing On Demand < / ParentCode >
    < Disabled > N < / disabled >
    < ListOfPicklistValue >
    < PicklistValue >
    Escalation of OCP/SME < code > < code >
    Escalation of OCP/SME < DisplayValue > < / DisplayValue >
    < Disabled > N < / disabled >
    < / PicklistValue >
    < PicklistValue >
    Ask fusion < code > < code >
    Merge request < DisplayValue > < / DisplayValue >
    < Disabled > N < / disabled >
    < / PicklistValue >



    Code
    ---------




    SELECT distinct
    EXTRACTVALUE (value (SR), ' / ParentPicklistValue/ListOfPicklistValue/PicklistValue/Code ','xmlns = "urn: / crmondemand/xml/list of choices"') AS display.
    Return EXTRACTVALUE (value (SR),'/ ParentPicklistValue/ListOfPicklistValue/PicklistValue/DisplayValue ',' xmlns = "urn: / crmondemand/XML/picklist"'),.
    EXTRACTVALUE (value (SR), '/ ParentPicklistValue/ParentDisplayValue','xmlns = "urn: / crmondemand/XML/picklist"') AS parent_display,
    EXTRACTVALUE (value (SR), '/ ParentPicklistValue/ParentCode','xmlns = "urn: / crmondemand/XML/picklist"') AS parent_return
    TABLE (XMLSEQUENCE ((EXCERPT)
    WEB_SERVICE (' <? xml version = "1.0" encoding = "UTF - 8" standalone = "no"? > < envelope soap: xmlns:soap = "http://schemas.xmlsoap.org/soap/envelope/")
    xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" container = "http://www.w3.org/2001/XMLSchema" >
    < soap: Body >
    < PicklistWS_GetPicklistValues_Input xmlns = "urn: crmondemand/ws/list dropdown /" >
    Type < FieldName > < / FieldName >
    Service request < RecordType > < / RecordType >
    < / PicklistWS_GetPicklistValues_Input >
    < / soap: Body >
    "< / envelope soap: >.
    (' document / urn: crmondemand/ws/list dropdown /: ' GetPicklistValues, Id_de_la_session).
    "/: soap envelope / soap: Body / * / * / * ',' xmlns:soap ="(http://schemas.xmlsoap.org/soap/envelope/'))) SR "


    ERROR
    ---------

    ORA-19025: EXTRACTVALUE returns the value of a single node


    UNDERSTANDING
    ---------------------------

    As my Xpath only points until the node - ParentPicklistValue and not the child nodes under it. That's why, when I try to interview the child nodes - / ParentPicklistValue/ListOfPicklistValue/PicklistValue/Code, I get the error mentioned above.

    REQUIREMENT
    -----------------------

    Can someone help me to receive the values of the mother and child values based on xml and query above.

    Hello

    It's a classic ;)

    You need a second XMLSequence who shreds the collection of PicklistValue in relational lines:

    select extractvalue(value(sr2), '/PicklistValue/Code', 'xmlns="urn:/crmondemand/xml/picklist"') AS Display
         , extractvalue(value(sr2), '/PicklistValue/DisplayValue', 'xmlns="urn:/crmondemand/xml/picklist"') AS Return
         , extractvalue(value(sr1), '/ParentPicklistValue/ParentDisplayValue', 'xmlns="urn:/crmondemand/xml/picklist"') AS parent_display
         , extractvalue(value(sr1), '/ParentPicklistValue/ParentCode', 'xmlns="urn:/crmondemand/xml/picklist"') AS parent_return
    from table(
           xmlsequence(
             extract( WEB_SERVICE( ... )
                    , '/soap:Envelope/soap:Body/ns:PicklistWS_GetPicklistValues_Output/ListOfParentPicklistValue/ParentPicklistValue'
                    , 'xmlns="urn:/crmondemand/xml/picklist"
                       xmlns:ns="urn:crmondemand/ws/picklist/"
                       xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"' )
           )
         ) sr1
       , table(
           xmlsequence(
             extract( value(sr1)
                    , '/ParentPicklistValue/ListOfPicklistValue/PicklistValue'
                    , 'xmlns="urn:/crmondemand/xml/picklist"' )
           )
         ) sr2
    ;
    

    What is your version of the database BTW?
    10.2 and upward, you can use the XMLTable.

  • Do stuff to PL/SQl that returns the value and redirect to modal page by setting this value

    Hello

    a button click Page1 I would perform a PL/SQL procedure that returns a value in P1_ITEMVAL and then redirect to a page 2 (modal page) and the value of an item on this page with the value previously returned. To do the same thing with a normal page is quite easy:

    Button action is present, then process of PL/SQL that returns the value in the P1_ITEMVAL element and, finally, a branch at page 2 that sets P2_ITEMVAL with P1_ITEMVAL. I really have no idea how to do the same thing when the target is a modal page.

    I created a unit test on https://apex.oracle.com/pls/apex (application 1554 - redir_to_modal)

    Workspace: tests

    USER: supporter

    PWD: supporter1234

    Any help would be much appreciated.

    Kind regards

    Pavel

    Pavel

    If you prepare a URL using the value calculated in the PLSQL of DA part you can then use a subsequent stage of javascript to set the location of the window.

    This will jump to the top of the page of the modal dialog box

    : P1_URL: = apex_util.prepare_url)

    ' f ? p ='|| : APP_ID - Application id

    |': 2' - Page id

    ||': ' || : APP_SESSION - Session id

    ||':'                      -- Request

    ||':NO'                    -- Debug

    : ': ' - Clear Cache

    : ': ' - Settings

    ||' P2_ITEMVAL'

    : ': ' - Parameter values

    || (: P1_ITEMVAL);

    then in the action of javascript

    Window.Location.Replace ($v ('P1_URL'));

    Hope this is of some use

    Concerning

    Kelvin

  • Return the value of the DB display in a Popup Lov (selected)

    Hello

    I use a Popup Lov to select a value and check in the DB (it works), but I do not know how to return this value as selected in the popup Lov and keep the other options available to select again.

    Any ideas?

    Thank you in advance,
    Alan Martini

    Hi Alan,

    OK - keep in mind that this will affect each using the popup LOV page

    Text on the page popup LOV template, under the body of Page attributes, I removed the onload = "first_field ()" let fair: style = "margin: 0;" "

    Then, as part of Page footer text below that, I added:

    <script type="text/javascript">
    var aa = document.getElementsByTagName("A");
    if (aa)
    {
     aa[0].focus();
    }
    </script>
    

    It's just a collection of tags 'A', and if there is at least one, it shifts the focus to the first. My previous SQL makes the value currently selected one in the list, so this should be the same as that. As the item has focus, the user has just need to press ENTER to select this option.

    Andy

  • How to return the value 0 for no data using the County?

    Hi all
    I used this query to count the number of records for each month of the year:

    SELECT DISTINCT COUNT (I.information_sid) COUNT, TO_DATE (TO_CHAR (INSERT_DATE, 'MM'), 'MM') MONTH

    INFORMATION I

    TO_DATE GROUP (TO_CHAR (INSERT_DATE, 'MM'), 'MM')

    ORDER BY TO_DATE (TO_CHAR (INSERT_DATE, 'MM'), 'MM')

    But this code returns no value for months without data
    I want to return the value '0' for any month of data. How, please?

    Note: I use reports 6i.

    Maybe this?

    SELECT SUM(CNT_REC) CNT_REC, MONTH
    FROM
    (
    SELECT COUNT(I.information_sid) CNT_REC, TO_DATE(TO_CHAR(INSERT_DATE,'MM'),'MM') MONTH
    FROM INFORMATIONS I
    GROUP BY TO_DATE(TO_CHAR(INSERT_DATE,'MM'),'MM')
    UNION ALL
    SELECT 0, LPAD(ROWNUM,2,0)
    FROM ALL_OBJECTS
    WHERE ROWNUM <= 12
    )
    GROUP BY MONTH
    ORDER BY MONTH
    

    No need to SEPARATE during the use of GROUP BY.

    -Clément

  • DICOM metadata - extractvalue returns the value of a single node

    Hello

    I have difficulties in getting the value of the objects with repeated elements. Specifically, I need to get the value of spacing of pixels in the following excerpt from xml.
    <DICOM_OBJECT>
    ..
         <DECIMAL_STRING tag="00181063" definer="DICOM" name="Frame Time" offset="900" length="2">0.0</DECIMAL_STRING>
         <CODE_STRING tag="0018106A" definer="DICOM" name="Synchronization Trigger" offset="910" length="10">NO TRIGGER</CODE_STRING>
    ..
         <DECIMAL_STRING tag="00280030" definer="DICOM" name="Pixel Spacing" offset="1660" length="22">0.003562</DECIMAL_STRING>
         <DECIMAL_STRING tag="00280030" definer="DICOM" name="Pixel Spacing" offset="1660" length="22">0.003562</DECIMAL_STRING>
         <UNSIGNED_SHORT tag="00280100" definer="DICOM" name="Bits Allocated" offset="1690" length="2">8</UNSIGNED_SHORT>
        <UNSIGNED_SHORT tag="00280101" definer="DICOM" name="Bits Stored" offset="1700" length="2">8</UNSIGNED_SHORT>
    ..
    </DICOM_OBJECT>
    Normally, I use the following query to get the value of spacing of pixels:
     select EXTRACTVALUE(t.dicom.metadata
                          ,'/DICOM_OBJECT/*[@name="Pixel Spacing"]'
                         ,'xmlns=http://xmlns.oracle.com/ord/dicom/metadata_1_0')  scale_factor
       from my_dicom_object t
    It works, but not when there are two elements. Then I get the error: "ORA-19025: EXTRACTVALUE returns the value of a single node.


    All I really need is to get the value of the first node with the name of "spacing of pixels. Despite the many examples available to do with traditional xml paths, I was unable to find an example that makes using XPATH search strings rather than direct tag structure.

    Can someone give an example?

    Thank you!

    Published by: rcdev on August 10, 2009 15:20

    All I really need is to get the value of the first node with the name of "spacing of pixels.

    This? :

    select EXTRACTVALUE(t.dicom.metadata
                          ,'/DICOM_OBJECT/*[@name="Pixel Spacing"][1]'
                         ,'xmlns=http://xmlns.oracle.com/ord/dicom/metadata_1_0')  scale_factor
       from my_dicom_object t
    
  • fatal error when installing master collection '[FATAL] installation - installation package error C:\Users\Desktop\MasterCollection_CS6_LS6\packages\core\PDApp.pimx. Returns the value of pim_installPackage = - 1

    Hello

    When I try to install a trial like photoshop cs6 or master collection cs6 product, I get the error "Installer has not initialized. I used Adobe cleaner to remove all products cs6 and tried again, but no luck, same error.

    I opened the log file and find this line:

    [FATAL] Setup error - installation package C:\Users\moshe-a\Desktop\MasterCollection_CS6_LS6\packages\core\PDApp.pimx.

    Returns the value of pim_installPackage = - 1

    No idea how to fix?

    Thank you, Momu

    start at the top and work your way down to apply applicable patches until your problem is solved.

    If (win) cc: https://helpx.adobe.com/creative-cloud/kb/creative-cloud-desktop-application-failed.html

    If your error is:

    "Setup failed to initialize. File not found. ' or 'could not initialize installation. This could be due to missing files.

    first of all, rename folder OOBE OOBE.old.

    to find the OOBE:

    Win 64 bit OS: Program Files x86\Common Files\Adobe\OOBE

    Win 32 bit OS: Program Files \Common Files\Adobe\OOBE

    Mac os: HD > library > application support of > adobe > caps

    Mac os: USER > library > application support of > adobe > OOB

    If it fails or isn't the exact error you see, uninstall, clean (http://www.adobe.com/support/contact/cscleanertool.html) and reinstall.

    If you use an installation dvd:

    Copy the contents of the drive in a desktop folder and install from this directory.

    If you are using a mac:

    1. try to create a new user account in Mac with administrator privileges.

    2. connect to the new user, navigate to Mac HD > Application > utilities > Adobe Installer folder, locate products such as Adobe Reader, Adobe Flash, Adobe Air and uninstall the

    3. navigate to the user library > Application Support > Adobe and Adobe put in the trash.

    4. navigate to Mac HD > library > Application Support > Adobe and Adobe put in the trash.

    5 restart the installation.

    If everything is applicable above fails, check your Setup logs:

    http://helpx.Adobe.com/Photoshop-elements/KB/troubleshoot-install-using-logs-elements.html

  • Mathmatical function to return the value in injectors

    Hello
    I have obliged. If value for ex Lake 4400000, he should return as 4.4millions even for billions.
    is there an oracle function to return the value in this format. ???

    Hello

    When I want to have a "readable" released in large numbers, I use to do the following:

    Scott@my11g SQL>with t as (
      2  select 3456123456 n from dual
      3  union all select 4567123 from dual
      4  union all select 123465 from dual
      5  )
      6  select n, case when n>1000000000 then trunc(n/1000000000,1)||' Billions'
      7  when n>1000000 then trunc(n/1000000,1)||' Millions'
      8  else to_char(n) end fmtn
      9  from t ;
    
             N FMTN
    ---------- -------------------------------------------------
    3456123456 3.4 Billions
       4567123 4.5 Millions
        123465 123465
    

    ------
    * + [change] + *.
    Moreover, lakh [url http://en.wikipedia.org/wiki/Lakh] has no meaning outside of South Asia.
    Especially for a French man like me, grown with [url http://en.wikipedia.org/wiki/International_System_of_Units] International system of units that is fighting against what I call "funky" measures empirical such miles, yards, feet, inches, just not multiple of 10³
    Same billion mean differ depending on the country (see [url http://en.wikipedia.org/wiki/Long_and_short_scales] long and short scales)

    Just for "fun": [url http://articles.cnn.com/1999-09-30/tech/9909_30_mars.metric.02_1_climate-orbiter-spacecraft-team-metric-system?_s=PM:TECH] this is what can happen when we do not use the same system of units.

Maybe you are looking for

  • New style of Toshiba

    I want to commendate the efforts of Toshiba for the makeover of the internet support page, update the drivers (Win7) and the general support in the forums. Klemen

  • Satellite C70D-B-306 - 2 unknown devices in the list of devices

    Hello I have a PC laptop toshiba C70D-B-306 (psclee) and I reinstalled windows 8.1 since a DVD separate because I change the hard drive by default for a fast ssd drive. Everything works, but in my device manager, I have 2 unknown devices listed (with

  • Need your opinion on Qosmio F20-153

    Hello I'm considering buying a QOSMIO F20-153 and I was wondering if anyone knew if the Sims 2 are played on this subject, because graphics cards cannot play. And also, as it has Microsoft Media center as the operating system, Access and Excel come f

  • Scanner of Code information bar appears automatically

    Hi all: I have a problem with a bar code reader, specifically Unitech AS - 10U. Now my problem is this, I am trying to create a sub.vi which accepts the entry of a bar code scanner as if entering the keyboard, make sure that information is the right

  • HP2311X LED monitor - no signal message

    Recently bought the HP 2311 x monitor and it works fine, until tonight.  Because of the duration of inactivity, the monitor goes to sleep;  usually, it doesn't take long to awaken, until tonight.  The display shows "no signal".  Check all cable conne