Pierre8r
unread,Mar 18, 2008, 3:06:55 PM3/18/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to H2 Database
Hello,
Because the DATE format into my texte file is mm/dd/yyyy and not
yyyy-mm-dd, when I run my SQL code, I have the following message error
from SQuirreL :
Error: Cannot parse date constant 10/01/2007, cause: format yyyy-mm-dd
[90009-68]
SQLState: 90009
ErrorCode: 90009
How to parse this date and time without error ?
The best will be to have, date and time in the same data ( a
TIMESTAMP ?).
My texte file
10/01/2007,23:46,2.04345,2.0436,2.04345,2.04345,-1
10/01/2007,23:47,2.04345,2.04345,2.04345,2.04345,-1
10/01/2007,23:48,2.04345,2.04345,2.04345,2.04345,-1
10/01/2007,23:49,2.04345,2.04345,2.0433,2.0433,-1
10/01/2007,23:50,2.0433,2.0433,2.04325,2.04325,-1
10/01/2007,23:51,2.04325,2.04325,2.04325,2.04325,-1
10/01/2007,23:52,2.04325,2.04325,2.04325,2.04325,-1
10/01/2007,23:53,2.04325,2.04325,2.04325,2.04325,-1
My SQL code
DROP TABLE IF EXISTS RAWDATAS;
CREATE TABLE RAWDATAS (
DATE DATE,
TIME TIME,
OPEN DOUBLE,
HIGH DOUBLE,
LOW DOUBLE,
CLOSE DOUBLE,
VOLUME BIGINT
);
INSERT INTO RAWDATAS SELECT *
from CSVREAD('K:\\12-H2-Data\
\GBPUSD-1mn.txt','DATE,TIME,OPEN,HIGH,LOW,CLOSE,VOLUME',null,',');
Regards,
Pierre8r