Date & time in sql through jdbc URGENT!!!

hi,
How do I enter date & time in this format "16 MAR 2002 12:54:23 pm" in the database of oracle through jdbc-sql?
Please help me out.
Its urgent.
Regards
Deepa Datar

If you are familiar with Oracle, you can use PL/SQL to do the work for you. I didn't test this, but it's probably pretty close.
String sql = "INSERT INTO TBLA
VALUES(TO_DATE('16 MAR 2002 12:54:23 P.M.','DD MON YYYY HH24:MI:SS P.M.'))";
I'm assuming that you know how to insert data, you are only wondering about the specifics of dates?
This can also be done using a prepared statement. You would code the insert statement something like this:
String sql = "INSERT INTO TBLA
VALUES(TO_DATE(?,'DD MON YYYY HH24:MI:SS P.M.'))";
I would suggest that if you can convert the time military (24 hour) time, it is easier to handle. The data format model for this is HH24. Otherwise you will need two prepared statements, one for A.M. and one for P.M.
Good luck.

Similar Messages

  • Date/Time in SQL

    Hey,
    I'm trying to get CF to put the date or date/time into the SQL 2000 date/time field by using Toolbox insert record form wizard. Then use the date picker on the date field.
    my error was
    Error Executing Database Query.
    [Macromedia][SQLServer JDBC Driver][SQLServer]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
    the SQL date/time field is 8 characters long, so, I don't know the best way to go about shoving a date/time into it in CF.
    Thanks in advance!

    Hi Kenneth,
    I´m by no means a CF expert, but...
    the SQL date/time field is 8 characters long, so, I don't know the best way to go about shoving a date/time into it in CF
    ...do your ADDT Control Panel´s *database* "Date format" and "Time formats" settings match the required SQL 2000 date/time format ?
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • How to insert date/time to sql database

    Hi,
    I would like to insert date and time alongside with my data receiving from the sensor.
    Right now i can insert data into sql table everytime when the data changes but i also wanted to insert the date and time as well.
    Thank you in advance!

    I create a field that is a datetime and set the default value to getdate().  So everytime i make an entry into this database, it automatically adds a datestamp.

  • Query data from MS SQL db through Oracle ? By using JAVA ?

    Hi folks,
    I would like to sync our one table in oracle db with table in different system, stored in MS SQL database.
    What would be the easiest option for connection from Oracle to MS SQL db to be able to query data from MS SQL through some Oracle package?
    If possible, I would like to keep all "tricky steps" within Oracle database. I heard about option with Java, but so far we have no experience with java in Oracle.
    Our database: Oracle 11g Database Standard Edition One
    Many thanks,
    Tomas

    C:\Users\tomeo>dg4pwd HELIOS
    ORACLE Gateway Password Utility
    Constructing password file for Gateway SID HELIOS
    For user account SYSTEM
    OPW-00001: Unable to open password-file (RC=0)
    C:\Users\tomeo>

  • Relational queries through JDBC with the help of Kodo's metadata for O/R mapping

    Due to JDOQL's limitations (inability to express joins, when relationships
    are not modeled as object references), I find myself needing to drop down to
    expressing some queries in SQL through JDBC. However, I still want my Java
    code to remain independent of the O/R mapping. I would like to be able to
    formulate the SQL without hardcoding any knowledge of the relational table
    and column names, by using Kodo's metadata. After poking around the Kodo
    Javadocs, it appears as though the relevant calls are as follows:
    ClassMetaData cmd = ClassMetaData.getInstance(MyPCObject.class, pm);
    FieldMetaData fmd = cmd.getDeclaredField( "myField" );
    PersistenceManagerFactory pmf = pm.getPersistenceManagerFactory();
    JDBCConfiguration conf = (JDBCConfiguration)
    ((EEPersistenceManagerFactory)pmf).getConfiguration();
    ClassResolver resolver = pm.getClassResolver(MyPCObject.class);
    Connector connector = new PersistenceManagerConnector(
    (PersistenceManagerImpl) pm );
    DBDictionary dict = conf.getDictionary( connector );
    FieldMapping fm = ClassMapping.getFieldMapping(fmd, conf, resolver, dict);
    Column[] cols = fm.getDataColumns();
    Does that look about right?
    Here's what I'm trying to do:
    class Foo
    String name; // application identity
    String bar; // foreign key to Bar
    class Bar
    String name; // application identity
    int weight;
    Let's say I want to query for all Foo instances for which its bar.weight >
    100. Clearly this is trivial to do in JDOQL, if Foo.bar is an object
    reference to Bar. But there are frequently good reasons for modeling
    relationships as above, for example when Foo and Bar are DTOs exposed by the
    remote interface of an EJB. (Yeah, yeah, I'm lazy, using my
    PersistenceCapable classes as both the DAOs and the DTOs.) But I still want
    to do queries that navigate the relationship; it would be nice to do it in
    JDOQL directly. I will also want to do other weird-ass queries that would
    definitely only be expressible in SQL. Hence, I'll need Kodo's O/R mapping
    metadata.
    Is there anything terribly flawed with this logic?
    Ben

    I have a one point before I get to this:
    There is nothing wrong with using PC instances as both DAO and DTO
    objects. In fact, I strongly recommend this for most J2EE/JDO design.
    However, there should be no need to expose the foreign key values... use
    application identity to quickly reconstitute an object id (which can in
    turn find the persistent version), or like the j2ee tutorial, store the
    object id in some form (Object or String) and use that to re-find the
    matching persistent instance at the EJB tier.
    Otherwise, there is a much easier way of finding ClassMapping instances
    and in turn FieldMapping instances (see ClassMapping.getInstance () in
    the JavaDocs).
    Ben Eng wrote:
    Due to JDOQL's limitations (inability to express joins, when relationships
    are not modeled as object references), I find myself needing to drop down to
    expressing some queries in SQL through JDBC. However, I still want my Java
    code to remain independent of the O/R mapping. I would like to be able to
    formulate the SQL without hardcoding any knowledge of the relational table
    and column names, by using Kodo's metadata. After poking around the Kodo
    Javadocs, it appears as though the relevant calls are as follows:
    ClassMetaData cmd = ClassMetaData.getInstance(MyPCObject.class, pm);
    FieldMetaData fmd = cmd.getDeclaredField( "myField" );
    PersistenceManagerFactory pmf = pm.getPersistenceManagerFactory();
    JDBCConfiguration conf = (JDBCConfiguration)
    ((EEPersistenceManagerFactory)pmf).getConfiguration();
    ClassResolver resolver = pm.getClassResolver(MyPCObject.class);
    Connector connector = new PersistenceManagerConnector(
    (PersistenceManagerImpl) pm );
    DBDictionary dict = conf.getDictionary( connector );
    FieldMapping fm = ClassMapping.getFieldMapping(fmd, conf, resolver, dict);
    Column[] cols = fm.getDataColumns();
    Does that look about right?
    Here's what I'm trying to do:
    class Foo
    String name; // application identity
    String bar; // foreign key to Bar
    class Bar
    String name; // application identity
    int weight;
    Let's say I want to query for all Foo instances for which its bar.weight >
    100. Clearly this is trivial to do in JDOQL, if Foo.bar is an object
    reference to Bar. But there are frequently good reasons for modeling
    relationships as above, for example when Foo and Bar are DTOs exposed by the
    remote interface of an EJB. (Yeah, yeah, I'm lazy, using my
    PersistenceCapable classes as both the DAOs and the DTOs.) But I still want
    to do queries that navigate the relationship; it would be nice to do it in
    JDOQL directly. I will also want to do other weird-ass queries that would
    definitely only be expressible in SQL. Hence, I'll need Kodo's O/R mapping
    metadata.
    Is there anything terribly flawed with this logic?
    Ben
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Date/Time erros when working with Database Connectivity toolkit

    Hi!,
    We are observing errors with date/time when working with LV. The error occurs when the system datetime format is set such that day precedes month (e.g. dd/mm/yyyy). Our VI uses LV 7.1, Database Connectivity 1.0 and SQL Server 2000 on a Win2000 machine.
    Problem details
    Our database in SQL server has a table having columns with data type "datetime"
    If the system date format (as set in control panel) is "mm/dd/yyyy", the 'insert into database' vi works fine. This function inserts the date and time (among other things) into the above mentioned table.
    However, when the system datetime is set to dd/mm/yyyy we start receiving error that date and time is beyond range for dates in which the date had the day field greater than 12 (e.g. 23/10/2005). With the same settings, if the date is such that day field is equal or less than 12 (e.g. 03/10/2005), we do not receive an error but the date is interpreted as 10 March 2005 rather than 03 September 2005.
    Clearly LV (or is it SQL) is mistaking the day field as month.
    We have taken care that when sending and receiving date, the format date and time string is set as per system settings.
    Thus, if system setting is "dd/mm/yyyy" our format string is "%d/%m/%Y"
    And if the setting is "mm/dd/yyyy" our format string is"%m/%d/%Y"
    Any help on problem cause and cure is welcome.
    Thanks,
    Gurdas
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu

    Hi Xu,
    You answer led me to some very interesting fact finding on how SQL server handles date and time. I have attached a zip file which contains webpages that throw more light on this issue.
    The attached pages tell me that SQL has an inbuilt date/time reference format. The default in mm/dd/yyyy. Which explains why my VI worked when I used that format to write to SQL.
    However there is a catch:
    SQL expects the date/time to be in its inbuilt reference format when you WRITE data to SQL. If the date/time is in a different format, better tell SQL about it by using say the SET command you mentioned.
    BUT what about the date/time format when you are reading data from SQL?
    Our finding is that SQL sends date/time string in the system date format when you READ from SQL !!! That is very surprising behaviour (why differentiate between write and read?).
    Is our finding correct?
    So, we adopted the following simple strategy (yet to be fully tested):
    1) Whenever we write date/time to SQL, the string is formatted as mm/dd/yyyy. Presently, the user's SQL server is in the default state. Caveat is that if the user changes SQL date/time from default (which is mm/dd/yyyy) to anything else, our software will give errors. But then he changed it  ;-)
    2) When we read date/time from SQL we format the string as per system date/time format.
    I know this is not very robust coding. But assuming the user keeps his SQL in the current setting, should we expect smooth working?
    In other words, are there any errors and/or flaws in our strategy?
    Thanks,
    Gurdas
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu

  • Uploading data through jdbc thin client appl to database is taking time.

    Hi
    When application team try to upload data (excel file) through JDBC app to the database is taking too much time. When I checked through TOAD below query in background is taking too much time.
    SELECT NULL AS table_cat, t.owner AS table_schem,
    t.table_name AS table_name, t.column_name AS column_name,
    DECODE (t.data_type,
    'CHAR', 1,
    'VARCHAR2', 12,
    'NUMBER', 3,
    'LONG', -1,
    'DATE', 91,
    'RAW', -3,
    'LONG RAW', -4,
    'BLOB', 2004,
    'CLOB', 2005,
    'BFILE', -13,
    'FLOAT', 6,
    'TIMESTAMP(6)', 93,
    'TIMESTAMP(6) WITH TIME ZONE', -101,
    'TIMESTAMP(6) WITH LOCAL TIME ZONE', -102,
    'INTERVAL YEAR(2) TO MONTH', -103,
    'INTERVAL DAY(2) TO SECOND(6)', -104,
    'BINARY_FLOAT', 100,
    'BINARY_DOUBLE', 101,
    1111
    ) AS data_type,
    t.data_type AS type_name,
    DECODE (t.data_precision,
    NULL, t.data_length,
    t.data_precision
    ) AS column_size,
    0 AS buffer_length, t.data_scale AS decimal_digits,
    10 AS num_prec_radix, DECODE (t.nullable, 'N', 0, 1) AS nullable,
    NULL AS remarks, t.data_default AS column_def, 0 AS sql_data_type,
    0 AS sql_datetime_sub, t.data_length AS char_octet_length,
    t.column_id AS ordinal_position,
    DECODE (t.nullable, 'N', 'NO', 'YES') AS is_nullable
    FROM all_tab_columns t
    WHERE t.owner LIKE :1 ESCAPE '/'
    AND t.table_name LIKE :2 ESCAPE '/'
    AND t.column_name LIKE :3 ESCAPE '/'
    ORDER BY table_schem, table_name, ordinal_position
    All other activity on app and database is fine.
    Kindly need a suggestion soon regarding this.
    Thanks
    SHIYAS

    which is easier to read & understand?
    SELECT NULL                                        AS table_cat,
           t.owner                                     AS table_schem,
           t.table_name                                AS table_name,
           t.column_name                               AS column_name,
           Decode (t.data_type, 'CHAR', 1,
                                'VARCHAR2', 12,
                                'NUMBER', 3,
                                'LONG', -1,
                                'DATE', 91,
                                'RAW', -3,
                                'LONG RAW', -4,
                                'BLOB', 2004,
                                'CLOB', 2005,
                                'BFILE', -13,
                                'FLOAT', 6,
                                'TIMESTAMP(6)', 93,
                                'TIMESTAMP(6) WITH TIME ZONE', -101,
                                'TIMESTAMP(6) WITH LOCAL TIME ZONE', -102,
                                'INTERVAL YEAR(2) TO MONTH', -103,
                                'INTERVAL DAY(2) TO SECOND(6)', -104,
                                'BINARY_FLOAT', 100,
                                'BINARY_DOUBLE', 101,
                                1111)                  AS data_type,
           t.data_type                                 AS type_name,
           Decode (t.data_precision, NULL, t.data_length,
                                     t.data_precision) AS column_size,
           0                                           AS buffer_length,
           t.data_scale                                AS decimal_digits,
           10                                          AS num_prec_radix,
           Decode (t.nullable, 'N', 0,
                               1)                      AS nullable,
           NULL                                        AS remarks,
           t.data_default                              AS column_def,
           0                                           AS sql_data_type,
           0                                           AS sql_datetime_sub,
           t.data_length                               AS char_octet_length,
           t.column_id                                 AS ordinal_position,
           Decode (t.nullable, 'N', 'NO',
                               'YES')                  AS is_nullable
    FROM   all_tab_columns t
    WHERE  t.owner LIKE :1 ESCAPE '/'
           AND t.table_name LIKE :2 ESCAPE '/'
           AND t.column_name LIKE :3 ESCAPE '/'
    ORDER  BY table_schem,
              table_name,
              ordinal_position

  • How to insert chinese data into MS SQL Server 2000 through JDBC

    I am trying to insert chinese data into MS SQL server 2000 using JDBC. how to do this?
    can anybody help me.
    thanx.

    I am trying to insert chinese data into MS SQL server 2000 using JDBC. how to do this?
    can anybody help me.
    thanx.

  • Plz its URGENT : Storing unicode data in MS SQL Server 2000 through JSPs

    Hello All,
    I'm trying to store unicode data, entered from JSP page into the SQL Server. For that I've tried the following :
    1> I put tag -
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    2> Also set in JSP tag -
    <%@page contentType="text/html;charset=UTF-8"%>
    But, still data is being entered in ISO-8859-1 format, don't know why. I tried with function for convertion - private String toUniCode(String strPar)-it successfully shows me the unicode data in alret msg, but it doesn't enters unicode data in SQL Server. In SQL Server only '??????' get entered. I kept data-type in SQL Server as nvarchar to store data in unicode.
    Would it be possible for me, to accept the data as UTF-8 itself & can I store it in SQL Server as it is? How can I do that? I'm accepting data in 'marathi' language.
    Plz, anybody Help me, I'm trying for this from around more than 1 week.
    Thanks in advance for any replies!

    Hello dmorris800,
    Thanx for your help. In fact I've tried lot many alternatives for that. Later I realised that it was problame of Driver, not of code. I was using jdbc:odbc driver which doesn't support unicode, or I don't know what was the problame with it.
    But I downloaded the driver named :'TaveConnect30C'. It is the connection optimised driver of Atinav.com This is the JDBC3 Type 4 Driver for MS SQL Server 6.5/7.0/2000 & trial version of which can be downloaded from http://www.atinav.com/download.htm
    It is really very good type-4 Driver.
    Cheers
    -Yogesh

  • Inserting files in to Oracle 8i database through JDBC - Only 4k data file

    Hi,
    I need to insert a files(images or excel files, doc files etc..) in to oracle 8i database through JDBC program. But i am not able to store more than 4k data files in to files. can any body give me solutions regarding this.
    My code is like this...
    String fileName ="Sample.jpg";
                                  String dataSource = "jdbc/oracle";
                   File file=null;
                   FileInputStream fis = null;
                   Context initCtx=null;
                   DataSource ds = null;
                   Connection con = null;
                   try
                        initCtx = new InitialContext();
                        ds = (DataSource)initCtx.lookup(dataSource);
                        con = ds.getConnection();
                      try
                         file = new File(fileName);
                         fis = new FileInputStream(file);
                        catch(FileNotFoundException fe)
                             out.println("File Not Found");
                                            PreparedStatement pstmt = con.prepareStatement("insert into bfiles values(?,?)");
                        pstmt.setString(1, fileName);
                        pstmt.setBinaryStream(2, fis, (int)file.length());
                        pstmt.executeUpdate();
                        out.println("Inserted");
                        fis.close();
                        pstmt.close();
                        con.close();
                        out.println("closed");
                   catch(Exception e)
                        out.println(e);
               }     in Oracle bi i have created a table like this :
    CREATE TABLE BFILES
      FILENAME     VARCHAR2(100)                    DEFAULT NULL,
      FILECONTENT  BLOB                             DEFAULT EMPTY_BLOB()
    )Please help me ourt to solve this problem.
    i got struck in this problem.
    its urgent
    thanks in advance
    djshivu

    Hi Shanu.
    Thanks for your help...
    By Using THIN driver also we can insert any files more than 4k and and retrive same. Fallowing codes worked fine for me using thin Driver .
    Following are the 2 programs to write and read.
    we can insert and retrieve any format of files ( jpg, gif, doc, xsl, exe, etc...)
    =======================================================
    // Program to insert files in to table
    import oracle.jdbc.driver.*;
    import oracle.sql.*;
    import java.sql.*;
    import java.io.*;
    import java.awt.image.*;
    import java.awt.*;
    * @author  Shivakumar D.J
    * @version
    public class WriteBlob{
    public static void main(String[] args){
    String filename = "018-Annexure-A.xls";
    Connection conn = null;
    try{
        Class.forName("oracle.jdbc.driver.OracleDriver");
        conn=DriverManager.getConnection("jdbc:oracle:thin:@test:1521:orcl","modelytics","modelytics");
        conn.setAutoCommit(false);
        Statement st = conn.createStatement();
        int b= st.executeUpdate("insert into bfiles values('"+filename+"', empty_blob())");
        ResultSet rs= st.executeQuery("select * from bfiles for update");
        rs.next();
        BLOB blob=((oracle.jdbc.driver.OracleResultSet)rs).getBLOB(2);
        FileInputStream instream = new FileInputStream(filename);
        OutputStream outstream = blob.getBinaryOutputStream();
        int chunk = blob.getChunkSize();
        byte[] buff = new byte[chunk];
        int le;
        while( (le=instream.read(buff)) !=-1)
            outstream.write(buff,0,le);
        instream.close();
        outstream.close();
        conn.commit();
        conn.close();
        conn = null;
        System.out.println("Inserted.....");
       catch(Exception e){
            System.out.println("exception"+e.getMessage());
            e.printStackTrace();
       }//catch
    }=======================
    // Program to retrieve files from database
    [import java.sql.*;
    import java.io.*;
    import java.awt.*;
    public class ReadImage
    public static void main(String a[])
        String fileName ="018-Annexure-A.xls";
        try
              Driver driver = new oracle.jdbc.driver.OracleDriver();
              DriverManager.registerDriver(driver);
              Connection con = DriverManager.getConnection("jdbc:oracle:thin:@test:1521:orcl", "modelytics", "modelytics");
            File file = new File("C:/Documents and Settings/USERID/Desktop/dump.xls");
              FileOutputStream targetFile=  new FileOutputStream(file); // define the output stream
              PreparedStatement pstmt = con.prepareStatement("select filecontent from bfiles where filename= ?");
              pstmt.setString(1, fileName);
               ResultSet rs = pstmt.executeQuery();
               rs.next();
               InputStream is = rs.getBinaryStream(1);
              byte[] buff = new byte[1024];
               int i = 0;
               while ((i = is.read(buff)) != -1) {
                    targetFile.write(buff, 0, i);
                   System.out.println("Completed...");
            is.close();
            targetFile.close();
            pstmt.close();
           con.close();
        catch(Exception e)
              System.out.println(e);
    }====================
    Table Structure is like this
    CREATE TABLE BFILES
      FILENAME     VARCHAR2(100)                    DEFAULT NULL,
      FILECONTENT  BLOB                             DEFAULT EMPTY_BLOB()
    )========================================================
    i hope above codes will helpful for our future programmers
    thanks shanu...
    regards
    djshivu...(javashivu)

  • GregorianCalendar datetime format convert to  sql server date time format

    please help me
    my GregorianCalendar date time format is like this. *08/01/29 02:25:59* . I try to insert my database(sql server 2000 )
    data type is datetime ,in my database table display like this *2029-08-01 02:25:59.000* .can you help me to insert correct date in my database table like ( . *08/01/29 02:25:59*)

    use [PreparedStatement |http://java.sun.com/javase/6/docs/api/java/sql/PreparedStatement.html] and setTimestamp:
    [http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html]

  • JDBC / oracle / date & TIME

    I am attempting to insert the date and time into a date-time field in an Orcale DB.  I am currently sending the following data into the field.
    24-AUG-2007 13:45:44
    and i am getting the error...
    Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'VENDOR_HEADER_1000' (structure 'STATEMENTNAME1000'): java.sql.SQLException: ORA-01830: date format picture ends before converting entire input string
    Thanks
    Skip Ford

    Hi Skip Ford,
        Follow these links
    http://www.java2s.com/Code/Java/Database-SQL-JDBC/GetdatefromOracle.htm
    http://ramblingabout.wordpress.com/2007/01/26/remember-date-time-timestamp/
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm
    Regards,
    Santosh.

  • JDBC & Date/Time

    I'm using PostGRESQLJDBC v. 8.2-505 ... a very recent JDBC driver, and the methods supplied in the ResultSet class include a getTime() method, which returns a 'Time' instance, and a getDate() method, which returns a 'Date' instance (assuming that I pass each method the name of a column within the result set corresponding to a date or time in the database).
    Problem: Date and Time are both basically deprecated in favor of the 'Calendar' class. JDBC is fairly standarized, even between databases, yes? I'm a little new here to java... is there any kind of accepted practice here? There certainly isn't a getCalendar() method...
    What is the standard way of wrapping time/date results from a database into a Java 'Calendar'? Please also note that the time and date values come from 2 different columns in the database in order to maintain SQL-cross compatibility... Please don't tell me I need to start parsing strings, here.

    When using the getTime() and getDate() methods, you'll end up with a java.sql.Date and a java.sql.Time instances. Those two classes are subclasses of the java.util.Date class.
    You should obtain full date/time information by adding time (milliseconds since epoch) values from those two instances.java.util.Date date = new java.util.Date(rs.getDate("TIME_COL").getTime() + rs.getTime("TIME_COL").getTime);Note that the Date and Time classes are not deprectated, but thy shouldn't be no more built out of Year-Month-Day-etc.

  • Data services with SQL Server 2008 and Invalid time format variable

    Hi all
    Recently we have switched from DI on SQL Server 2005, to DS(Date Services) on SQL Server 2008. However I have faced an odd error on the query that I was running successfully in DI.
    I validate my query output using a validation object to fill either Target table (if it passes), or the Target_Fail table (if it fails). Before sending data to the Target_Fail table, I map the columns using a query to the Target_Fail table. As I have a column called 'ETL_Load_Date' in that table, which I should fill it with a global variable called 'Load_Date'. I have set this global variable in the script at the very first beginning of the job. It is a data variable type:
    $Load_Date = to_char(sysdate(),'YYYY.MM.DD');
    When I assign this global variable to a datetime data type cloumn in my table and run the job using Data Services, I get this error:
    error message for operation <SQLExecute>: <[Microsoft][ODBC SQL Server Driver]Invalid time format>.
    However I didn't have this problem when I was running my job on the SQL Server 2005 using Data Integrator. The strange thing is that, when I debug this job, it runs completely successfully!!
    Could you please help me to fix this problem?
    Thanks for your help in advance.

    Thanks for your reply.
    The ETL_Date is a datetime column and the global variable is date data type. I have to use the to_char() function to be able to get just the date part of the current system datetime. Earlier I had tried date_part function but it returns int, which didn't work for me.
    I found what the issue was. I don't know why there were some little squares next to the name of the global variable which I had mapped to the ETL_Date in the query object!!! The format and everything was OK, as I had the same mapping in other tables that had worked successfully.
    When I deleted the column in the query object and added it again, my problem solved.

  • Urgent help needed in date & time

    I want to same date & time in one field in a database
    As java.sql.date doesn`t support HH:MM:SS
    how do i save (Date & Time) field in the database

    you can extract the hours, minutes, and seconds from your date object.
    int hours = dateobject.getHours();
    int minutes = dateobject.getMinutes();
    int seconds = dateobject.getSeconds();
    String hhmmss = String.valueOf(hours)+String.valueOf(minutes)+String.valueOf(seconds);

Maybe you are looking for

  • How do I get all pages numbered in an 800 page combined pdf document?

    I took 12 PP presentations and made the handouts into pdfs. Then did the drag and drop into acrobat pro xi. It comes out to about 800 pages, but I cannot get it to print page numbers?

  • Blue Screen Crash - returning with magnified screen

    Somethings up with my G5 PowerPc. Its been working well for ages - but now suddenly it crashes unexpectably [often when using Safari or photoshop]. The curser stops moving, the screen goes blue for about 10 seconds - returns highly magnified - and th

  • Contacts crashing when I try to "find duplicates". Please help!

    Process:         Contacts [285] Path:            /Applications/Contacts.app/Contents/MacOS/Contacts Identifier:      com.apple.AddressBook Version:         8.0 (1365) Build Info:      AddressBook_executables-1365000000000000~1 Code Type:       X86-64

  • Column Header Text not displaying for multi-set column block

    Hello, I have assigned a key figure set to a column block in a report writer report in ECC 6 using table FAGLFLEXT with both additional text functionality use and without use of additional text. I can't get the column headings text for these key figu

  • HELP!!! Hidden folder in MyComputer: iPod_Control

    When I connect my ipod to MY computer there is a "hidden" folder calles iPod_control where i can enter and find all my music. The songs etc. are randomly divided in 49 folders. However, this hidden folder only appears when it is connected to MY OWN c