Re: [GENERAL] Issue with to_timestamp function

2014-09-10 Thread Lou Oquin
... Thanks again. Lou -Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Monday, September 08, 2014 6:04 PM To: Lou Oquin; pgsql-general@postgresql.org Subject: Re: [GENERAL] Issue with to_timestamp function On 09/08/2014 01:52 PM, Lou Oquin wrote: I've imported

Re: [GENERAL] Issue with to_timestamp function

2014-09-09 Thread Lou Oquin
The data is ts 08/06/2014 03:08:58 08/06/2014 03:08:58 08/06/2014 03:08:58 Thanks Lou From: Melvin Davidson [mailto:melvin6...@gmail.com] Sent: Monday, September 08, 2014 2:30 PM To: Lou Oquin Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Issue with to_timestamp function I suspect

Re: [GENERAL] Issue with to_timestamp function

2014-09-09 Thread Lou Oquin
@postgresql.org Subject: Re: [GENERAL] Issue with to_timestamp function On 09/08/2014 01:52 PM, Lou Oquin wrote: I've imported a csv export of an MS SQL Server log file into a staging table on my local install of Postgresql (9.3/UTF8 encoding) for analysis. The staging table definition is: CREATE

Re: [GENERAL] Issue with to_timestamp function

2014-09-09 Thread Lou Oquin
] Issue with to_timestamp function Lou Oquin loq...@nammotalley.com writes: Ive imported a csv export of an MS SQL Server log file into a staging table on my local install of Postgresql (9.3/UTF8 encoding) for analysis. The staging table definition is: CREATE TABLE sql_log_import

Re: [GENERAL] Issue with to_timestamp function

2014-09-09 Thread Adrian Klaver
On 09/08/2014 04:18 PM, Lou Oquin wrote: Jerry; When I run the query you supplied, with my database select sli.ts::timestamptz as tstamp from public.sql_log_import sli where sli.id = 10; I get the following error: ERROR: invalid input syntax for type timestamp with time zone: 08/06/2014

Re: [GENERAL] Issue with to_timestamp function

2014-09-09 Thread Adrian Klaver
On 09/08/2014 04:18 PM, Lou Oquin wrote: Jerry; When I run the query you supplied, with my database select sli.ts::timestamptz as tstamp from public.sql_log_import sli where sli.id = 10; I get the following error: ERROR: invalid input syntax for type timestamp with time zone: 08/06/2014

[GENERAL] Issue with to_timestamp function

2014-09-08 Thread Lou Oquin
I've imported a csv export of an MS SQL Server log file into a staging table on my local install of Postgresql (9.3/UTF8 encoding) for analysis. The staging table definition is: CREATE TABLE sql_log_import ( id serial NOT NULL, ts text, -- will convert to ts when merging into

Re: [GENERAL] Issue with to_timestamp function

2014-09-08 Thread Melvin Davidson
I suspect your data is not what you think it is. What do you see when you do SELECT ts FROM from sql_log_import LIMIT 3; On Mon, Sep 8, 2014 at 4:52 PM, Lou Oquin loq...@nammotalley.com wrote: I’ve imported a csv export of an MS SQL Server log file into a staging table on my local install

Re: [GENERAL] Issue with to_timestamp function

2014-09-08 Thread Jerry Sievers
Lou Oquin loq...@nammotalley.com writes: Ive imported a csv export of an MS SQL Server log file into a staging table on my local install of Postgresql (9.3/UTF8 encoding) for analysis. The staging table definition is: CREATE TABLE sql_log_import ( id serial NOT NULL, ts text, --

Re: [GENERAL] Issue with to_timestamp function

2014-09-08 Thread Adrian Klaver
On 09/08/2014 01:52 PM, Lou Oquin wrote: I’ve imported a csv export of an MS SQL Server log file into a staging table on my local install of Postgresql (9.3/UTF8 encoding) for analysis. The staging table definition is: CREATE TABLE sql_log_import ( id serial NOT NULL, ts text, -- will

Re: [GENERAL] Issue with to_timestamp function

2014-09-08 Thread Melvin Davidson
The data is ts 08/06/2014 03:08:58 08/06/2014 03:08:58 08/06/2014 03:08:58 Hmmm, this works for me: CREATE TABLE sql_log_import ( id serial NOT NULL, ts text, -- will convert to ts when merging into sql_server_logs CONSTRAINT sql_log_import_pk PRIMARY KEY (id) ) WITH ( OIDS=FALSE );

Re: [GENERAL] Issue with to_timestamp function

2014-09-08 Thread Adrian Klaver
On 09/08/2014 04:06 PM, Lou Oquin wrote: I'm executing the query in pgAdmin3, in a SQL query window. The results are coming from the history tab of the output pane. Alright. I was trying to clear up confusion on my end, because the log entries you show are coming from SQL Server. Do you

Re: [GENERAL] Issue with to_timestamp function

2014-09-08 Thread Adrian Klaver
On 09/08/2014 01:52 PM, Lou Oquin wrote: I’ve imported a csv export of an MS SQL Server log file into a staging table on my local install of Postgresql (9.3/UTF8 encoding) for analysis. select to_timestamp(ts, 'MM/DD/ hh24:mi:ss')::timestamp with time zone as tStamp from sql_log_import