Skip site navigation (1) Skip section navigation (2)

Part 1 of several - Converting a varchar to an interval

From: Shawn <postgres(at)xmtservices(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Part 1 of several - Converting a varchar to an interval
Date: 2008-03-26 15:56:54
Message-ID: 200803261556.54418.postgres@xmtservices.net (view raw or flat)
Thread:
Lists: pgsql-sql
Hello,

I have several large tables, over 100 million records each.  One of the fields 
is callee 'duration'.  It is a varchar that contains what is essentially an 
integer that is the duration of an event in milleseconds.  Could someone tell 
me a simple way to convert a value such as 134987 stored in a varchar into an 
interval?

This will dovetail with my next question. 

Thanks for all the help both now and previous.

Shawn

pgsql-sql by date

Next:From: ShawnDate: 2008-03-26 16:05:56
Subject: Question 2 Interval and timestamptz
Previous:From: Shavonne Marietta WijesingheDate: 2008-03-26 11:46:43
Subject: Export Access 97 to PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group