Not receiving correct results using to_timestamp and java code

Using Linux AS3 10.1.0
When I run the following query via ISQL, I receive results. Executing the same query via a java program returns no results. In the time range, if I change the 16:00:00 to 03:00:00, I get results VIA the JAVA CODE and ISQL. I am not receiving an error message in java or the database. If there is a problem with the java code, why do I get results when I change to 03:00:00?
Any comments / solutions are much appreciated!
SELECT (to_char(time_started, 'YYYY-MM-DD HH24:MI:SS')) AS dtg FROM table1 WHERE (time_started between to_timestamp('2006/04/19 16:00:00', 'YYYY/MM/DD HH24:MI:SS') and (to_timestamp('2006/04/21 19:00:00', 'YYYY/MM/DD HH24:MI:SS'))) ORDER BY time_started DESC

Hi
1) Is it possible that your Java and iSQL sessions are running in different timezones for some reason (eg because of a login.sql, a login trigger or something similar run by one and not the other, which could have done something like:
ALTER SESSION SET TIME_ZONE = '-8:00';
2) Are they TIMESTAMP, TIMESTAMP WITH TIMEZONE, or TIMESTAMP WITH LOCAL TIMEZONE? Given that you are only working down to seconds, would DATE datatype be simpler?
3) Check the TIME_STARTED values returned and make sure they are what you expect
4) double check that you really do have identical SQL in both cases, and that you haven't accidentally changed one of them
HTH
Regards Nigel

Similar Messages

  • User parameter are not show in database using Servlet and java Bean

    Hello Sir,
    when I insert the parameter in run time, weblogic server and JSP show that parameter are saved.
    Allthough row increment in database but they not show in database.
    Here My Code:
    login.html:
    <html>
    <head>
    <title>A simple JSP application</title>
    <head>
    <body>
    <form method="get" action="tmp" >
    Name: <input type="text" name="user">
    Password: <input type="password" name="pass">
    <input type="Submit" value="Submit">
    </form>
    </body>
    </html>LoginServlet.java:import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginServlet extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException{
    try
    String user=request.getParameter("user");
    String pass=request.getParameter("pass");
    co.SimpleBean st = new co.SimpleBean();
    st.setuserName(user);
    st.setpassword(pass);
    request.setAttribute("user",st);
    request.setAttribute("pass",st);
    RequestDispatcher dispatcher1 =request.getRequestDispatcher("submit.jsp");
    dispatcher1.forward(request,response);
    catch(Exception e)
    e.printStackTrace();
    }SimpleBean.java:
    package co;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.*;
    public class SimpleBean {
    private String user="";
    private String pass="";
    private String s="";
    public String getuserName() {
    return user;
    public void setuserName(String user) {
    this.user = user;
    public String getpassword() {
    return pass;
    public void setpassword(String Pass) {
    this.pass= pass ;
    public String issueData()
    try
    System.out.println("Printed*************************************************************");
    Class.forName("oracle.jdbc.driver.OracleDriver");
    System.out.println("Connection loaded");
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@VijayKumar-PC:1521:XE","SYSTEM","SYSTEM");
    System.out.println("Connection created");
    PreparedStatement st=con.prepareStatement("insert into vij2 values(?,?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String NAME=getuserName();
    st.setString(1,NAME);
    String PASSWORD=getpassword();
    st.setString(2,PASSWORD);
      st.executeUpdate();
    System.out.println("Query Executed");
    con.close();
    s=  "Your logging is saved in DB ";
    System.out.println("Your logging is saved in DB *****************");
    return(s);
    catch(Exception e)
    e.printStackTrace();
    return "failed";
    }submit.jsp:This is Submit page
    <jsp:useBean id="st" class="co.SimpleBean"/>
    <jsp:setProperty name="st" property="*" />
    <jsp:getProperty name="st" property="userName" /> <br>
    <jsp:getProperty name="st" property="password" /> <br>
    <% st.issueData();%>
    <%
    out.println("Ur data is saved in DB");
    %>Please Help me.
    Thanks.

    Ok, this seems to be a long and convoluted path to do absolutely nothing.
    You submit the form.
    You run a servlet that gets the parameters correctly (good), creates a SimpleBean (good) and then sets this into request attribute space under the names "user" and "pass" - (why?)
    You then forward to the jsp: submit.jsp.
    Submit.jsp creates a new SimpleBean, and attempts to populate it with <jsp:setProperty>. You then call the issueData method on it.
    Your complaint: Rows are being created in the database which have empty string values instead of the parameters you have passed.
    So, why are the values blank? Where do you think these values should be coming from?
    Looking at SimpleBean we find one mistake - you have mis-named your get/set methods.
    To properly follow java beans standards, you should use camel-case for your methods.
    Rather than getuserName() the method should be getUserName(). getpassword() should be getPassword() etc etc.
    The method getUserName() defines a property "userName" for the bean.
    Once that is fixed, lets go to submit.jsp. The <jsp:setProperty> statement will try and set all properties of the bean from the request parameters.
    There are no request parameters "userName" or "password" so those values don't get set in the bean, therefore it uses their default value of empty string - "".
    There ARE request parameters called "user" and "pass" but because they aren't properties of the bean, they get ignored.
    As a result, the values are empty string, and that is exactly what gets inserted into the database.
    Ways to fix this
    1 - rename your parameters on your form to be "userName" and "password" to match the bean. That way the <jsp:setProperty> tag will populate them properly.
    or
    2 - Call issueData() method from your servlet after you have created the SimpleBean. Better in my opinion as you then don't have any scriptlet code on a JSP page.
    Cheers,
    evnafets

  • Help two macs with identical setup and one does not receive phone calls using Yosemite and iOS 8.1 on iPhone 6. What is going on Apple?

    Ive got an imac from 2008 and MBPr from 2013. the imac does indeed receive regular calls but the newer  mac, the MBPr from 2013 does not.
    what is going on apple?
    MacBook Pro (Retina, 15-inch, Late 2013), iOS 8.1

    i got it. I fixed it by setting Time Zone in automatically in both iphone and MBC
    From the Apple () menu, choose System Preferences > Date & Time > Date & Time.
    Enable "Set Automatically".
    Click the Time Zone tab and confirm the closest city is correct.
    do the same in the iphone and it will work 

  • After installing the new Yosemite OS on my iMac I can no longer send email. I can receive email, but not send. I use gmail and can send email on the gmail (google) site, but not on "mail" on my iMac. Any others with this problem? What should we do?

    After installing the new Yosemite OS on my iMac I can no longer send email. I can receive email, but not send. I use gmail and can send email on the gmail (google) site, but not on "mail" on my iMac. Any others with this problem? What should we do?

    My gmail, which is correctly configured for Mail with gmail SMTP and Google IMAP, works for awhile on Mail, which I leave open while working on other applications. But several times a day I get msg from Google: "We recently blocked a sign-in attempt to your Google Account" . . . and requiring me to verify my account details, re-enter passwords, confirm security settings (or change them from "disable" to "enable less secure methods" and so on). In Mail I also have tried "taking all accounts online", and re-entering my gmail password inside Mail account settings. These steps successfully re-set comms between gmail and Mail ... for awhile, then it happens again. Enough occurrences over a work day that I just quit Mail and revert to accessing gmail directly. Apple Care advisor and an Apple knowledge base article say that Apple can't deal with this, as gmail is third-party app, and they refer me to gmail, and so far I've found nothing helpful there.
    From today I also have several instances of a window saying "Mail has unexpectedly closed" and asking me to Re-open it.
    I also use Yahoo mail, which stops working with Mac Mail at the same time as gmail, but I do not receive notices to re-verify from Yahoo.
    I recently upgraded from Mavericks to Yosemite. The Mail problem happened occasionally with Mavericks but is far more frequent with Yosemite.

  • Re: Satellite Pro U400: voice is not received correctly using Skype

    Hello!
    I have a little problem with my notebook. When i'm speaking with skype, using a external microphone, my voice is not received correctly.
    This happens only with my laptop and only with skype.
    I have tried to change ADSL line and microphone, but my voice is received always intermittently.
    How can I resolve this problem?
    thanks a lot for your help! Bye,
    Davide.

    It is not easy to say what is wrong there. As you know Skype is third part application and it is not easy to be objective about it. I use Skype on two Toshiba notebooks. In office I have Satellite A300 and at home Satellite P200D.
    Generally I use headset on both of them because I think the sound quality is good and when I use headset other side can me hear much better.
    Maybe sound quality depends also on your internet connection and Skype service on this certain moment.

  • Not able to recognize any video/audio devices using jmf and java soun

    Hi ,
    I need one help from your side.
    Here I am expecting some clarifications from you. Before that let you my environement.
    My working environment :
    Eclipse tool and added jmf jar to my project I did not do any thing more.
    If any thing I need to do just let me know. My target platform is MAC & UBUNTU.
    Please bare with my questions.
    1) I am not able to recognize any video/audio devices using jmf and java sound APIs on My system.
    ( I checked with the app mentioned in the http://www.java-forums.org/new-java/11201-jmf-cannot-connect-device.html )
    Do we need any administrives rights for our working PC.
    What is the procedure/ setup I need to follow from a java application to enable particular audio/video device since I dont about end-user system setup right.
    If possible send some sample code to recognize /r detect audio device ( voice input ). It should run on both MAC and UBUNTU.
    2) I run the one sample audio recording application of this link (http://www.jsresources.org/examples/SimpleAudioRecorder.java.html) which is provided by YOU.
    I got output audio file and able to hear voice on UBUNTU system but not able to hear voice on MAC system.
    I heared that default line in ( audio setup of the sys) is wont take any voice data on MAC.Why I made this stmt means we are getting false when using isSupported methods of JAVA SOUND API.
    ( like for TragetdataLine ...i,e, all ports are getting false)
    I have one sample audio recording app implemented by QUICKTIME API. In this case also he taking audio ftom device only using quicetime API.
    With that we are able to record and hear audio ( voice input --> not line in , external device we added some thing like SSB...)
    3) In case of Video capturing DataSource, Streams are implemented by PullBufferDataSource , PullBufferStream intefaces used.
    In case of Audio capturing DataSource, Streams are implemented by PushBufferDataSource, PushBufferStream intefaces used.
    Can you explain the reasons ? I gone through API but i am not clear.
    HOPE I WILL BE CLARIFIED EVERY THING FROM YOU.
    Thanks
    RamaRao.G

    Hi ,
    I need one help from your side.
    Here I am expecting some clarifications from you. Before that let you my environement.
    My working environment :
    Eclipse tool and added jmf jar to my project I did not do any thing more.
    If any thing I need to do just let me know. My target platform is MAC & UBUNTU.
    Please bare with my questions.
    1) I am not able to recognize any video/audio devices using jmf and java sound APIs on My system.
    ( I checked with the app mentioned in the http://www.java-forums.org/new-java/11201-jmf-cannot-connect-device.html )
    Do we need any administrives rights for our working PC.
    What is the procedure/ setup I need to follow from a java application to enable particular audio/video device since I dont about end-user system setup right.
    If possible send some sample code to recognize /r detect audio device ( voice input ). It should run on both MAC and UBUNTU.
    2) I run the one sample audio recording application of this link (http://www.jsresources.org/examples/SimpleAudioRecorder.java.html) which is provided by YOU.
    I got output audio file and able to hear voice on UBUNTU system but not able to hear voice on MAC system.
    I heared that default line in ( audio setup of the sys) is wont take any voice data on MAC.Why I made this stmt means we are getting false when using isSupported methods of JAVA SOUND API.
    ( like for TragetdataLine ...i,e, all ports are getting false)
    I have one sample audio recording app implemented by QUICKTIME API. In this case also he taking audio ftom device only using quicetime API.
    With that we are able to record and hear audio ( voice input --> not line in , external device we added some thing like SSB...)
    3) In case of Video capturing DataSource, Streams are implemented by PullBufferDataSource , PullBufferStream intefaces used.
    In case of Audio capturing DataSource, Streams are implemented by PushBufferDataSource, PushBufferStream intefaces used.
    Can you explain the reasons ? I gone through API but i am not clear.
    HOPE I WILL BE CLARIFIED EVERY THING FROM YOU.
    Thanks
    RamaRao.G

  • Enterprise Manager does not give correct results

    I am using version 9.0.2.0.1 core edition(oc4j & web-cache).
    My application consists of business components, java beans and jsp. It is running fine.
    Oracle enterprise manager is not giving correct results of memory/cpu usage by oc4j_home and bc4j.
    Some times it does not gives result, when i refresh it twice or thrice it shows results.
    But results are not correct. On each refresh it gives different results.
    Then it is very hard to find which resuslt is correct.
    waiting for response,
    Tahir.

    i have been using 9iAS versions 102*, 90200, 90201, and now using 903.
    As stated above, some times the results for oc4j_home is displayed.
    But the memory/cpu usage for bc4j is never shown.
    Also, its radio-button is always disabled. while its status is "running".
    On BC4J page, it also shows results of application modules created. But these results are usually wrong.
    How bc4j will be enabled, and how its memory results can be get ???
    Tahir.

  • VL06I Inbound delivery monitor not showing correct results

    Dears,
    We are creating inbound deliveries on the basis of POs and creating GR via MIGO after eliminating movement type in line item catageory by using SPRO. For monitoring we would like to use VL06I but its not showing correct results.
    Can anyone guid me ?
    Regards,
    FR

    You can list all Inbound Deliveries by selecting "List Inbound Deliveries"  Tab in VL06I
    May be if you can little elaborate the issue

  • NonLinearFitWithMaxIters does not give correct results for phase

    Dear all,
    I am trying to fit a sin cuve with NonLinearFitWithMaxIters function of labwindows, but the results given by this function are dispersed a lot (the function does not give same results).
    In fact, I have two waveforms signals v and i (of 104 points), and I  find the phase between the two signals with NonLinearFitWithMaxIters.
    The two singals v and i are  measured with an osciloscope.
    I use the following fit functions :
    v=p1*sin(wt+p2) ;
    i=p3*sin(wt+p4) ;
    I use the NonLinearFitWithMaxIters function to fit the data and to have the parameters  p1, p2, p3, p4. Then, the phase is claculated as follow phase=p4-p3.
    The problem is that the phase calculted between the two signals (v and i) is different for each run for the same conditions.
    In fact, for a same condition, I measure different times the signals v and i, and I calculate the phase p4-p3, using NonLinearFitWithMaxIters. The goal is to calculate a mean of phases for the same condition. For example, there are cases where the phase=-5 degree, and other cases when phase=12 degree.
    For ten measures of v and i, the phase calculated is different. I get a big dispersion between the phases.
    I would like to know please why I have a big difference in phases calculated with the same condition?whern using NonLinearFitWithMaxIters.
    I read that this function does not give all time the correct results, is there a way to know when the results are not corrects and when they are correct ?
    And is there any solution to find accuratly the phase between the two waveforms.
    Thank you for your precious answer.

    The pseudocode which I am using is :
    v_err=NonLinearFitWithMaxIters(array_x,array_v,v_y_fit,1252,100,sinus,v_coef,2,&v_mean_squareError);
    The fit function is
    double sinus(double x, double a[],int noef){
        return (a[0]*sin((w*x)+a[1]));
     I use the same inital coeficient of v_coef for each run :     
    v_coef[0]=0.03;
    v_coef[1]=0.2;
    These coeficient are choosen arbitrary.
    In this case, the number of points of the data is 1252 (the data of array_v).
    The number of iterations is 100.
    For the array_x, the distance between adjacents values of the array is dt=0.4*1e-9(difference between array_x[i] anv array_x[i+1]=dt=0.4*1e-9 ).
    for (i=0;i<1252;i++){
    array_x[i]=i*(0.4*1e-9);
    The means square error returnned by the function when it is complished is  small, of the order of 0,001.
    I read the help
    « From the help:
    You must pass a pointer to the nonlinear function f(x,a) along with a set of initial guess coefficients a. NonLinearFitWithMaxIters does not always give the correct answer. The correct output sometimes depends on the initial choice of a. It is very important to verify the final result.
    That means that the function cannot be used, as it does not give correct results. How
    can we check if the results are good or not ? in my case.
    I think that in my case, the function does not give correct results, but how can I check if the results are good, or not ? The mean square error is small.

  • RegionRenderer encodeAll The region component with id: pt1:r1 has detected a page fragment with multiple root components. Fragments with more than one root component may not display correctly in a region and may have a negative impact on performance.

    Hi,
    I am using JDEV 11.1.2.1.0
    I am getting the following error :-
    <RegionRenderer> <encodeAll> The region component with id: pt1:r1 has detected a page fragment with multiple root components. Fragments with more than one root component may not display correctly in a region and may have a negative impact on performance. It is recommended that you restructure the page fragment to have a single root component.
    Piece of code is for region is:-
       <f:facet name="second">
                                                <af:panelStretchLayout id="pa1"
                                                                       binding="#{backingBeanScope.Assign.pa1}">
                                                    <f:facet name="center">
                                                        <af:region value="#{bindings.tfdAssignGraph1.regionModel}" id="r1"
                                                                   binding="#{backingBeanScope.Assign.r1}"/>
                                                    </f:facet>
                                                </af:panelStretchLayout>
                                            </f:facet>
    How do I resolve it ?
    Thanks,

    Hi,
    I see at least 3 errors
    1. <RegionRenderer> <encodeAll> The region component with id: pt1:r1 has detected a page fragment with multiple root components.
    the page fragment should only have a single component under the jsp:root tag. If you see more than one, wrap them in e.g. an af:panelGroupLayout or af:group component
    2. SAPFunction.jspx/.xml" has an invalid character ".".
    check the document (you can open it in JDeveloper if the customization was a seeded one. Seems that editing this file smething has gone bad
    3. The expression "#{bindings..regionModel}" (that was specified for the RegionModel "value" attribute of the region component with id "pePanel") evaluated to null.
    "pageeditorpanel" does seem to be missing in the PageDef file of the page holding the region
    Frank

  • Simple XML to Text onversion using XSLT and Java?

    Hi all!
    I'm completly new to using XSLT and Java and are trying to convert a XML file into a ordinary Textfile that I am gonna import into another application.
    I started up writing a ordinary XML parser in Java which interpreted the XML file, but realized later on that it was possible to do with a ordinary XSLT.
    So far it is a 2-step process right now, I've tied my XSLT to the XML file and then just open the XML file up in a ordinary browser and then get the result.
    I found an example (http://www.onjava.com/pub/a/onjava/excerpt/java_xslt_ch5/index.html?page=3) where u hook up a XML file and a XSL file separately and the process it, and dump it to Stdout. But do I need to hook up a XSL file like this when the XML file is tied to a XSL file internally?

    Just to give you an example to show you how easy it is: http://www.daniweb.com/forums/thread137587.html

  • [svn:fx-4.x] 15119: Menu. popUpMenu textAlign should be start rather than left so it works correctly when using FTEText and direction =rtl.

    Revision: 15119
    Revision: 15119
    Author:   [email protected]
    Date:     2010-03-29 13:49:52 -0700 (Mon, 29 Mar 2010)
    Log Message:
    Menu.popUpMenu textAlign should be start rather than left so it works correctly when using FTEText and direction=rtl.  Also made same change for AccordionHeader, CheckBox and RadioButton just to be safe.
    QE notes:
    Doc notes: None
    Bugs: SDK-26028
    Reviewed By: Kevin
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-26028
    Modified Paths:
        flex/sdk/branches/4.x/frameworks/projects/framework/defaults.css

    Thank you so much wchp, this is brilliant. I have had this annoying problem for a long time. I eventually rang Mac support, they did not know how to fix the problem as you have suggested so they instigated many hardware replacements which eventually left my iMac severely crippled. They eventually replaced it with the latest model. But I spent two months working with a disabled computer which really interfere with my work.
    Your solution appears to have solved my problem, at least so far, but I am hopeful that it is a permanent fix. I hope that your suggestions are taken up by Apple support. This may solve many users problems and avoid Apple making expensive fixes that don't actually work.
    I thought that the new iMac would not have the 'Wake up from sleep by painting in the login window' problem but it did, this really annoyed me. Anyway now the problem appears to be solved, it's not I will repost and keep working on it. Thanks again.

  • My phone was left in a car overnight and now is not working correctly, screen looks funny and I cannot make calls? Will they be able to assist in  a store?

    My phone was left in a car overnight and now is not working correctly, screen looks funny and I cannot make calls? Will they be able to assist in  a store?

    Make an appointment at any Apple store, see what the genius bar says/does.
    You don't metion whether the car was hot or cold.

  • Information Retrieval with Genetic Programming using J2ME and Java WTK

    i have a big project to make a software using java programming especially n using J2ME and Java Wireless Toolkit, and i'm a begginer for java programming. I have no idea for the interface and how to setting connection between my phone mobile and GPRS. what should i do? thank you

    I believe MIT has lots of sourcecode. Try searching their site.

  • My itunes is not working correctly. can i delete and reinstall without losing my music

    My itunes is not working correctly. can i delete and reinstall without losing   music?

    Hi there,
    You may find the article below helpful.
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    http://support.apple.com/kb/HT1923
    iTunes Store purchases or songs imported from CDs are saved in your My Music folder by default and are not deleted by removing iTunes. While it is highly unlikely that you will lose any contents of your iTunes Library when following these steps, it is always a good idea to ensure that your iTunes library is backed up. If you're unsure how to backup, see iTunes: Back up your iTunes library by copying to an external hard drive.
    -Griff W.

Maybe you are looking for

  • Wifi problem with Mac after upgrade to Mavericks

    I just upgraded to Mavericks but something wrong with my wifi. i can get internet through LAN link from Airport but not through wifi even i can receive an IP address i tried connect to hotspot with my iphone5s and it works. Other devices can use wifi

  • Error while invoking onHeartBeat() method, exception is "Username supplied

    hi ... I am trying to invoke bpel process when we get email.. but i am getting the following error.. Error while invoking onHeartBeat() method, exception is "Username supplied in error". <mailAccount xmlns="http://services.oracle.com/bpel/mail/accoun

  • IPrint Renderer issue with 1.1

    Hi all. I have been running iPrint Appliance 1.0 for a while, and have followed the process to upgrade to 1.1 appliance (side-by-side export/import). This has worked fine. I have tried to install the newer renderer software onto our current render bo

  • Problems to find bapi to insert itens and services ME32K

    Hi Guys, I need insert itens and services on ME32K transaction. I run this using the call transaction method. But, I have problems with this because the program delay very much to run. It load the data, however, delay very much. I am finding a bapi t

  • Downgrade from Enterprise 3.1 to EDGE

    Do we have to make a new install if we will downgrade our installation from Enterprise 3.1 Sp03 to Edge. Is it simply just to change the license key? The current license applied is a temp enterprise license and system is installed at one server.