#267 SqlTool DSV time field Import

tools (21)

Discussion can be found at:


SQLTOOL as of 2011-06-15 ( HSQL Version 2.4.2 ) when using DSV to Import ( \m ) from a DSV file, and, the field type in the database is defined as TIME, the text for the TIME must include a DATE and space prior to the time ( for example: 1899-01-01 07:23:53 ). However, just a time of: 07:23:53 will result in an error.

I would suggest adding to the SqlTool documentation this situation and work-around, and, whenever possible, allowing SqlTool to 'accept' just a time format for a database field defined as TIME.



  • Blaine Simpson

    Blaine Simpson - 2011-07-01

    Coding done. Will commit shortly.

    Due to Oracle's lack of specification CAST support and non-intuitive preservation of times down to millisecond in 'DATE' columns, leaving the export side as it is, but enhancing import side as suggested.

  • Sliderule Smith

    Sliderule Smith - 2011-07-01

    I appreciate the effort, and, totally understand the differences in the export compared to import of data for a field type of TIME.

    Again, thank-you, and, much appreciated.


  • Blaine Simpson

    Blaine Simpson - 2011-07-01

    svn revision 4351

  • Blaine Simpson

    Blaine Simpson - 2011-07-14

    sliderule: Could you confirm that this works for you?

  • Sliderule Smith

    Sliderule Smith - 2011-07-14

    Yes, SQLTOOLS.JAR, when telling it to IMPORT ( \m ) a field defined as TIME, does NOT require a DATE as well. It works perfectly.

    Just as a few observations ( these are all positive ) I have found the TIME, can be input, for example, as:




    The point, the leading zero is not required, and, that is good. Perhaps, you could mention this in the documentation, if you are so inclined.

    Furthermore, with regard to the EXPORT ( \x ) . . . and . . . a TIME field, while it will include a DATE, the 'easy' work-around ( and quite satisfactory, in my opinioin ) is to code it, if using HSQL, with a SELECT statement, and using the . . . TO_CHAR( "MyTimeField", 'HH:MI:SS') as "MyTimeField" . . . the reason I am mentioning this, is, perhaps, if it were mentioned in the documentation, others will not have to 'bother' you asking the question. Just a way that you could say, IT IS IN THE DOCUMENTATION at . . . XXX.

    Conclusion, my observation is this issued is CLOSED and I appreciate your help.


  • Blaine Simpson

    Blaine Simpson - 2011-10-10
    • assigned_to: nobody --> unsaved
    • status: open --> closed

Log in to post a comment.