Date inserted as 0/0/0000

Hi, I'm facing a unique problem where the date i send to inserting in database is 2013-05-09 and the value inserted in db is 0000/0/0.
And the strange thing is the response i get is 20142014-05-09. I'm using toplink and java, Oracle10g.
From the request i parse the date as string and set it in a date object. Then after inserting i take the date object and convert as string to set in the response
Some one please help.
Edited by: 989104 on Feb 19, 2013 9:27 PM

989104 wrote:
1. I cannot explain whole of the table structure. The column name is H_DATE and its data type is DATE
2. Sample data -
Its of MM/DD/YYYY format
You state that the column is a DATE.
Then you state that it is of format 'MM/DD/YYYY'.
The two statements are mutually exclusive. A DATE data type is of oracle's internal format for date and time.
You are confusing the storage of the data with the presentation of the data
H_DATE
9/2/2012
2/29/2012
3. For converting string to date and date to string i use the following code respectively
DateFormat df = new SimpleDateFormat("YYYY-MM-DD");
df.parse(value);
new SimpleDateFormat("YYYY-MM-DD").format(value);
What is that codee? It doesn't look like valid Pl/SQL to me. And even if it were, it would b referencing locally written functions which could be doing anything.
Now the issue is with date being inserted as 0/0/0000see: [url http://edstevensdba.wordpress.com/2011/04/07/nls_date_format/] But I want to store my date as ... 

Similar Messages

  • Customizing data insert from

    I have a data insert from that is solely used to insert data in a database. I am trying to figure out a way to customize it such that a few file get auto filled. I use the form to insert data in a table called maintable. 8 of the 10 field of this maintable filled from different vendor's table(currently i manaully put it). What I like to do is see if I can integrate the vendor's table in the page and write codes to autofill the form that put the data in the maintable. I know maybe a while statement will do it. So if in the form  I input vendor's name and product id. it will get the data from vendor's table and relavent product to fill rest of the field. Any guidance will be greatly appreciated as I am very new to web development and don't have much experince in PHP codes.
    Thanks

    Maybe u can try like this. Assuming you have two inputs in form which I have assigned as below
    $product_id = $_POST['pid'];
    $vendor = $_POST['vendor_name'];
    Then do check for vendor name input.
    if(isset($_POST['vendor_name') && !empty($_POST['vendor_name'])) {
    $query = " SELECT * FROM vendor WHERE vendor_name = '$vendor' ";
    $query2 = mysql_query($query, $databaseName) or die(mysql_error);
    $vendor = mysql_fetch_assoc($query2);
    } else echo 'Vendor name doesn't exists';
    $var = $vendor['var'];
    assign for the rest values u want to store in maintable
    //do insert record
    $insert = INSERT INTO maintable .... VALUES ('$vendor', '$var',.....)

  • Combo Box doesn't persist data insertion settings

    Hi,
    I'm simply trying to setup a combo box that places the selected label into a destination table cell. I've tried about every combination possible to simply add a data insertion series. Please note, I AM clicking the plus button to add it to the list shown to the left of the settings. Unfortunately, everytime I have the series added and I click away from the selected combo box it loses the settings I just provided.
    Has anybody else had these frustrating issues with the combo box component?
    Thank you.

    Greg,
    The combo box component can be a bit fiddly at times. It would help if you let me know which version of Xcelsius you are using.
    In any case if you are simply trying to insert the label to a destination you dont need to bother with the series at all. Try it in this order:
    1) Drag a combo box component
    2) In combo box properties pane and click on the range select button beside Labels
    3) Select the range in your excel sheet that has the labels and click OK
    4) Go back to the properties pane and choose Insertion Type: Label
    5) Click the range select button beside Destination and select a cell
    6) To test it drag a Text -> Label compoent in and point it to the destination cell you selected in step 5.
    7) Preview to see if all is in order
    Let me know how you get on.
    Cheers,
    Ryan

  • SQL server Timeout issue in data insertion

    We are loading data from DB2 database to SQL server using Data flow task. During data insertion in SQL server, we are receiving the below error.
    "An exception has occurred during data insertion, the message returned from the provider is: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding."
    Kindly help to resolve this issue.
    Thanks!!!

    Check the connection timeout property of the source connection.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/a5571966-b14e-45c6-9ce8-4f5651d3ee00/ado-net-destination-timeout-issue?forum=sqlintegrationservices
    Regards, RSingh

  • Exception has occurred during data insertion ... Wrong number of parameters

    I am using an ADO dataflow source and an ADO dataflow destination to move data from a table on an IBM iSeries DB2 database to another IBM iSeries DB2 database on another machine.  The connection managers for source and destination both use .Net Providers\Odbc
    Data Provider with the Data Source Specification being ODBC connections specified on the Windows Server 2008 r2 machine hosting bids.  All the test connections work...so far so good.
    Issue is when I execute the control flow task the rows get picked up from the source DB2 database no problem but it fails on the insert to the destination DB2 table...The progress tab specifies the exceptions...
    [ADO NET Destination [601]] Error: An exception has occurred during data insertion, the message returned from the provider is: ERROR [07002] [IBM][System i Access ODBC Driver]Wrong number of parameters.
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "ADO NET Destination" (601) failed with error code 0xC020844B while processing input "ADO NET Destination Input" (604). The identified
    component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the
    failure.
    I put a data viewer on the data flow connection and the records I expect are  getting picked up and look ok. I checked to make sure the source and destination tables have the same number of columns in their record layout and identical data
    types and they look fine.
    Could someone kindly tell me whats going wrong?  Does the error message indicate that some of the columns are getting dropped from the dataset before the insert?
    Thanks much in advance for any help, Roscoe

    Hi Roscoe,
    Glad to hear that you have found the root cause. So, the issue occurs because numeric values with no decimal cannot be inserted into the Decimal data type column in the DB2 table. In SSIS, data type Decimal of DB2 database is mapped to data type DT_NUMERIC.
    To address the issue, you can do a data conversion for the column in question to define its precision and scale such as DT_NUMERIC(9,2) by using the Data Conversion Transformation before the ADO NET Destination.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Disabling data insertion in WFTASKHISTORY

    Hi
    In Orabpel.WFTaskPkg .. a procedure called 'updateTask' is defined;
    In the procedure following line is executed :
    IF p_IsVersionable = BOOLEAN_TRUE_STRING THEN
    createHistory(p_taskID);
    END IF;
    It inserts a record in the WFTASKHISTORY table if p_IsVersionable = true....
    Is it possible to set the value of 'p_IsVersionable' so that I can control the data insertion in WFTASKHISTORY table ? Any pointer will be helpful!!
    Thanks

    Hi Satish, this is an interesting question and as Michaela points out, Comments should be used to store non numeric data elements.
    However, your question makes me wonder what exectly do you want to enter characters for ? How would your use of characters for an amount be defined ? In case you would like to tell something about the amount (like the 100 for write-off is due to a customer not paying any bills), then you would use comments. I can imagine however that you want to use characters for sanother reason like adding new memebers to the database, but then you have to follow a different procedure.
    So please explain to what other use of characters you are thinking about.
    Best regards,
    Edwin van Geel

  • Spatial data insert problem

    Hello,
    i want to make an spatial data insert, but it doesn't work well. Help would be fine.
    create table SCHIFFSPOSITION(
    SCHIFF_ID                    NUMBER NOT NULL,
    SCHIFF_NAME                VARCHAR(25),
    SYS_POS_SN               VARCHAR(25),
    SYS_LAT_P4_DER               VARCHAR(15),
    SYS_LON_P4_DER               VARCHAR(15),
    GEOM                          SDO_GEOMETRY,
    constraint PK_SCHIFFSPOSITION primary key(SCHIFF_ID));
    insert into MDSYS.USER_SDO_GEOM_METADATA values ('SCHIFFSPOSITION', 'GEOM',
    SDO_DIM_ARRAY (
    SDO_DIM_ELEMENT ('Longitude', -180, 180, .0005),
    SDO_DIM_ELEMENT ('Latitude', -90, 90, .0005)),8307);
    create index SCHIFFSPOS_IDX on SCHIFFSPOSITION(GEOM) indextype is MDSYS.SPATIAL_INDEX parameters('sdo_indx_dims=2, layer_gtype=point');
    INSERT INTO SCHIFFSPOSITION(SCHIFF_ID, SCHIFF_NAME, SYS_POS_SN, SYS_LAT_P4_DER, SYS_LON_P4_DER,
    MDSYS.SDO_GEOMETRY(2001,8307, MDSYS.SDO_POINT_TYPE(SYS_LON_GRAD_DER,SYS_LAT_GRAD_DER,null),null,null)))
    VALUES (1, 'METEOR 63', 'GPS', '33° 54,4246 S', '18° 25,9184 E', '18.4319736', '-33.9070772');
    thank you very much

    Hi,
    please insert that way:
    INSERT INTO SCHIFFSPOSITION(SCHIFF_ID, SCHIFF_NAME, SYS_POS_SN, SYS_LAT_P4_DER, SYS_LON_P4_DER,GEOM)
    VALUES (1, 'METEOR 63', 'GPS', '33° 54,4246 S', '18° 25,9184 E', MDSYS.SDO_GEOMETRY(
      2001
      ,8307
      , MDSYS.SDO_POINT_TYPE(
        18.4319736
        ,-33.9070772
        ,null
      ,null
      ,null
    )

  • How is the data inserted into JTF_RS_SALESREPS?

    Hi,
    I wanted to know how is the data inserted into JTF_RS_SALESREPS.When we import the resources from CRM Foundation responsibilty the data will be inserted into jtf_rs_resource_extns.I think we need to run a concurrent program to transfer data from jtf_rs_resource_extns to JTF_RS_SALESREPS.
    Which Concurrent program should be run?
    Please help.
    Thanks.

    How is the data inserted into CST_INV_QTY_TEMP table ?TABLE: BOM.CST_INV_QTY_TEMP
    http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=CST_INV_QTY_TEMP&c_owner=BOM&c_type=TABLE
    Thanks,
    Hussein

  • How is the data inserted into CST_INV_QTY_TEMP table?

    Hi All,
    How is the data inserted into CST_INV_QTY_TEMP table ?
    Thanks in advance,
    Mayur
    Edited by: 928178 on 17-Apr-2012 04:29

    How is the data inserted into CST_INV_QTY_TEMP table ?TABLE: BOM.CST_INV_QTY_TEMP
    http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=CST_INV_QTY_TEMP&c_owner=BOM&c_type=TABLE
    Thanks,
    Hussein

  • Strange data inserted into table via table trigger

    Hi ,
    There is some strange phenomenon happen occasionally where some tables update records will have a TRIGGER to insert records into a table and once in a while, the record has some strange data inserted which looks like a memory corruption. It is running on 10.2.0.3.
    Does anyone ever encounter this before?
    Strange result:
    PRIM_KEY
    -3.614364951000000000000000000000000E-47
    -3.614364951000000000000000000000000E-47
    Normal result:
    PRIM_KEY
    1137KT
    1137KT
    ana

    Hi,
    What is strange in this? Its not memory corruption. Its just one of the numeric form of representation of number
    -3.614364951000000000000000000000000E-47it means -3.614364951 * 10 to the power of -47.
    Whatever value has been entered into the table depends on your business logic you coded, and user input.
    Regards

  • How to data insert Source server and Linked server (Target Server) at same transaction

    I have try several times for Data insert Source server and Linked server (Target Server) at same transaction.  I am using Begin transaction.  but Source server is completed and Linked server error (or Linked server Completed and source server
    ERROR). at this moment I want ROLL back. how?

    Hi
    Run below query by changing to yourr linked server name and see if DTC is enable or not.. if not
    Begin distributed transaction
    select * from [ServerName].master.dbo.sysprocesses
    Commit Transaction
    To enable MSDTC on each Web server on Windows Server 2008
    Click Start, click Run, type dcomcnfg and then click OK to open Component Services.
    In the console tree, expand Component Services, expand Computers, expand My Computer, and then expand Distributed Transaction Coordinator.
    Right click Local DTC, and click Properties to display the Local DTC Properties dialog box.
    Click the Security tab.
    In the Security Settings section, click Network DTC Access.
    In the Client and Administration section, select Allow Remote Clients and Allow Remote Administration.
    In the Transaction Manager Communication section, select Allow Inbound and Allow Outbound.
    In the Transaction Manager Communication section, select Mutual Authentication Required (if all remote machines are running Windows Server 2003 SP1), select Incoming Caller Authentication Required (if running MSDTC in a cluster), or select No Authentication
    Required if some of the remote machines are pre-Windows Server 2003 SP1. No Authentication Required is the recommended selection.
    Select Enable XA Transactions, and then click OK.
    Repeat steps 1 through 9 on the other Web servers.
    Thanks
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • TIPS(53) : DECODE를 이용한 DATE INSERT 시에 잘못된 값이 들어가는 경우.

    제품 : ORACLE SERVER
    작성날짜 : 2002-11-06
    TIPS(53) : DECODE를 이용한 DATE INSERT 시에 잘못된 값이 들어가는 경우
    =====================================================================
    Purpose
    decode를 사용하는 date data type의 처리에서는 가끔 예기치 않은
    오류가 발생된다. 예를 들면 2000년을 insert를 하였는데 실제 값은
    1900년이 들어가게 되는 문제이다. 이것은 사용자를 매우 당황하게
    만드는데 이런 경우에 대해 확인하고 조치하는 방법을 살펴보자.
    Problem Description
    1. nls_date_format을 'yy-mon-dd'로 하였을 경우
    SQL> ALTER SESSION SET NLS_DATE_FORMAT='YY-MON-DD';
    SQL> CREATE TABLE TABDATE(COLDATE DATE);
    SQL> INSERT INTO TABDATE(COLDATE)
    SELECT DECODE('1','0',NULL,'1',(TO_DATE('200511','RRRRMM')))
    FROM DUAL;
    SQL> SELECT TO_CHAR(COLDATE,'YYYY-MM-DD') FROM TABDATE;
    TO_CHAR(CO
    1905-11-01 -- 2005년이 들어가 있어야 하는데 오동작을 했다.
    2. nls_date_format을 'yyyy-mon-dd'로 하였을 경우
    SQL> ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MON-DD';
    SQL> INSERT INTO TABDATE(COLDATE)
    SELECT DECODE('1','0',NULL,'1',(TO_DATE('200511','RRRRMM')))
    FROM DUAL;
    SQL> SELECT TO_CHAR(COLDATE,'YYYY-MM-DD') FROM TABDATE;
    TO_CHAR(CO
    1905-11-01
    2005-11-01 -- 정상적인 값이 들어와 있다.
    3. 문제 설명
    어떻게 이런 문제가 발생하는가?
    이것은 dbms가 decode를 처리하는 내부적인 절차에 의해 벌어지는 것으로
    당연한 현상이다. decode를 처리할 경우 decode 안의 값이 to_date로
    처리되기 이전에 varchar2로 값을 넘겨 받아서 그 결과값으로 to_date
    함수에 넘겨저서 처리하게 된다.
    그런데 이 경우에 to_date 함수를 처리하기 전에 data의 conversion에
    이용되는 것이 시스템의 default NLS_DATE_FORMAT 값인 것이다.
    그러므로, 이 값의 년도 처리가 두 자리로 되어 있을 경우 년도를 두자리
    만을 처리하여 varchar2 값으로 넘기게 되고 이것을 to_date 함수를
    이용하여 처리하게 되므로 우리가 예상치 못한 값이 나오게 되는 것이다.
    실제 SQL이 다음과 같으면
    SELECT to_char(to_date('0511','yyMM'),'yyyymmdd') FROM DUAL;
    결과 값은 19051101로나오게 된다.
    Solution Description
    이 문제는 NLS_DATE_FORMAT의 년도가 두 자리로 지정된 경우에
    decode 함수를 사용하는 date data는 오동작을 할 가능성이 있다는 것이다.
    이에 대한 해결 방법은 nls_date_format의 년도를 네 자리로 지정해 주는 것이다.
    이에는 세 가지 방법이 있을 것이다.
    1. alter session set nls_date_format='yyyy-mm-dd';
    2. 환경변수의 nls_date_format을 변경하기.
    3. database 내의 nls_date_format를 변경하기.
    Reference Documents
    none

  • Data insertion

    Hello,
    my server is in germany.
    I have to insert data into a table from two locations from Germany as well as from india.
    But my intention is to insert the data with time zone GMT+2:00 at any point of time (whether i am inserting data from india or Germany)
    All data should be inserted as per the german time even though data insertion is being done form india.
    table name: data
    Fields : id number, datatime timestamp with time zone, value number
    could you please tell me how i should achieve it.
    At present when i am inserting data from india it is going with GMT+5:30
    And in germany as the daylightsaving is on. Two time zones will come up GMT+2:00, GMT+1:00
    thanks in advance.
    Kind Regards,
    Mohan

    thank for your reply.
    you told me how to get the sessiontimezone.
    but i am inserting the data as follows.
    insert into data(id, datetime, value) values (1, to_date('20008-10-28 23:59:59', 'yyyy-mm-dd hh24:mi:ss', 1);
    when i have run this stmt from my perl script(from my indian machine) it is inserting data with time zone +5:30
    when i have run the same script on the german server it is inserting data with GMt+2:00.
    But my intension is as follows.
    Indian machine : insert into data(id, datetime, value) values (1, to_date('20008-10-28 23:59:59', 'yyyy-mm-dd hh24:mi:ss', 1);
    select * from data where id = 1;
    1, 20008-10-28 23:59:59.000000 GMT+5:30, 1
    Indian machine: insert into data(id, datetime, value) values (2, to_date('20008-10-28 23:59:59', 'yyyy-mm-dd hh24:mi:ss', 2);
    select * from data where id = 2;
    2, 20008-10-28 23:59:59.000000 GMT+2:00, 2
    my intension is first one also should be inserted as 20008-10-28 23:59:59.000000 GMT+2:00.
    Please let me know if you did not get what i am asking.
    Regards,
    Mohan

  • Date insert problem m/d/yy not working

    I am trying to set up the 'birthday' date like in the 'contact management' tutorial in my user account section... For some reason, although my birthday set-up is just like the tutorial (MySQL field 'date' set as DATE, ADDT date setting is m/d/yy) and it's all uploaded to the server. When I go to add or update a record with the new birthday (just like in the tutorial) it returns with no errors, but the record in the db is '0000-00-00' instead of what I inserted... what I am I doing wrong?
    Thanks so much!

    Nathan, have you checked the Control Panel/Date Formats section & made sure the Formats are correct?
    I use a MySQL backend & have the following values in Control Panel:
    Set Database Date and Time Formats
    yyyy-mm-dd
    HH:mm:ss
    Set Screen Date and Time Formats
    mm/dd/yyyy
    hh:mm tt
    This works for me.
    Thanks,
    jlig

  • SCROLL_SENSITIVE result set can't see the data inserted.

    hi all ,
    I am trying to display all the latest data available in the table through SCROLL_SENSITIVE and UPDATABLE result set after inserting a new record in the table.
    But the result set obtained after executing the query initially is not able to see the newly inserted record in the table and hence same result is getting printed out in both the cases.
    Can u explain me what's happening in this case ?? And how can i get the updated record also without executing the statement query twice to get the latest result set.
    My full code is given below.
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class Misc3 {
    public static void main(String[] args) {
    Connection con = null;
    Statement stmt = null;
    ResultSet rs = null;
    try {
    int empid;
    String lname;
    String fname;
    int deptno;
    int mngrid;
    con = JDBCUtil.getOracleConnection();
    stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
    String query = "select employee_id , last_name , first_name , department_number , manager_id from employees ";
    rs = stmt.executeQuery(query);
    System.out.println("Before inserting the new record.....");
    while (rs.next()) {
    empid = rs.getInt(1);
    lname = rs.getString(2);
    fname = rs.getString(3);
    deptno = rs.getInt(4);
    mngrid = rs.getInt(5);
    System.out.println(empid + "\t" + lname + "\t" + fname + "\t" + deptno + "\t" + mngrid);
    System.out.println("Going to insert the new record.....");
    rs.moveToInsertRow();
    rs.updateInt(1, 10);
    rs.updateString(2, "Clark");
    rs.updateString(3, "John");
    rs.updateInt(4, 2);
    rs.updateInt(5, 2);
    rs.insertRow();
    System.out.println("New record inserted successfully.....");
    System.out.println("After inserting the new record.....");
    rs.beforeFirst();
    while (rs.next()) {
    empid = rs.getInt(1);
    lname = rs.getString(2);
    fname = rs.getString(3);
    deptno = rs.getInt(4);
    mngrid = rs.getInt(5);
    System.out.println(empid + "\t" + lname + "\t" + fname + "\t" + deptno + "\t" + mngrid);
    } catch (SQLException ex) {
    System.out.println("error code : " + ex.getErrorCode());
    System.out.println("error message : " + ex.getMessage());
    } finally {
    JDBCUtil.cleanUp(con, stmt);
    *** JDBCUtil Class ****
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class JDBCUtil {
    public static Connection getOracleConnection(){
    Connection con = null;
    try{
    // Load the driver
    Class.forName("oracle.jdbc.driver.OracleDriver");
    //Establish Connection
    con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","ex","ex");
    }catch(Exception ex){
    ex.printStackTrace();
    return con;
    public static void cleanUp (Connection con , Statement stmt){
    // Release the resource
    try{
    if(con != null){
    con.close();
    if(stmt != null){
    stmt.close();
    }catch(Exception ex){
    ex.printStackTrace();
    Edited by: user12848632 on Aug 13, 2012 2:06 PM

    >
    Can u explain me what's happening in this case ?? And how can i get the updated record also without executing the statement query twice to get the latest result set.
    >
    Sure - but you could have answered your own question if you had read the doc link I gave you in your other thread and next time you post code use \ tags on the lines before and after the code - see the FAQ for info
    17076 : Invalid operation for read only resultset
    {quote}
    •Internal INSERT operations are never visible, regardless of the result set type.
    {quote}
    See •Seeing Database Changes Made Internally and Externally in the JDBC Dev doc I pointed you to
    http://docs.oracle.com/cd/B28359_01/java.111/b31224/resltset.htm#i1024720
    Did you notice the words 'never visible'? You won't see them as part of the result set unless you requery.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Where can I buy a cinema HD display power adapter

    I try to find this product in the store : http://support.apple.com/kb/HT2803?viewlocale=fr_FR thank you

  • ITEM REGIONS

    Greetings, One question, I'm using a page template it has a item region with a page path, the following region has subpages links and the last one has an item region in order to allow the end users publish items. The problem comes here, when they pub

  • Hyperion Essbase - Exciting Job Opportunity in Financial Services in NY

    Moody's Corporation Hyperion Business Systems Analyst New York Company Moody's is an essential component of the global capital markets, providing credit ratings, research, tools and analysis that contribute to stable, transparent and integrated finan

  • How to best color correct image

    Hi, I earlier asked a question whereas I was having problems with color consistency from PS to ID. After resolving that I've run into another issue: In trying to figure out a way to put an image in ID in a specific set of red cmyk numbers. I've come

  • How can I delete/add Columns in my Report?

    Hi everybody, i´ve just a silly little question... We´re using APEX to revise our Daily Reject-Rows and some other Dimensiontables. For every Table, witch is to revise we´ve got a single Page in our APEX Application. Also, in every Page we created a