Pierre8r
未读,2008年3月18日 15:06:552008/3/18登录即可回复作者
登录即可转发
您无权在此群组中删除帖子
要么此群组的电子邮件地址为匿名状态,要么您得查看成员电子邮件地址权限才能查看原始帖子
收件人 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