FAQ
Readers,

A csv file contains data with date and time values in format dd/mm/yy hh:mm:

number,date time,text

So the CREATE command was used:

CREATE TABLE tablename (number int,timestamp,text varchar(150));
ERROR: syntax error at or near ","
LINE 1: CREATE TABLE tablename (number int,timestamp,text varchar(1...

The command SHOW DATESTYLE shows:

SHOW DATESTYLE;
DateStyle
-----------
ISO, DMY
(1 row)

What is my error to prevent import of the date and time values please?

Search Discussions

  • Vibhor Kumar at Apr 23, 2011 at 8:52 am

    On Apr 23, 2011, at 1:10 PM, e-letter wrote:


    CREATE TABLE tablename (number int,timestamp,text varchar(150));
    ERROR: syntax error at or near ","
    LINE 1: CREATE TABLE tablename (number int,timestamp,text varchar(1...


    You forgot to mention the columnname for timestamp:
    CREATE TABLE tablename (number int, <columnname> timestamp,text varchar(150));
    Thanks & Regards,
    Vibhor Kumar
    EnterpriseDB Corporation
    The Enterprise PostgreSQL Company
    vibhor.kumar@enterprisedb.com
    Blog:http://vibhork.blogspot.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedApr 23, '11 at 7:40a
activeApr 23, '11 at 8:52a
posts2
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

E-letter: 1 post Vibhor Kumar: 1 post

People

Translate

site design / logo © 2021 Grokbase