From: David Stanaway <david@netventures.com.au>
To: pgsql-sql@postgresql.org
Cc: lonh SENG <slonh@camgsm.com.kh>
Subject: Re: [ADMIN] SQL Script
Date: Wed, 30 Jan 2002 13:08:23 +1100
Message-ID: <3D4F50BE-1526-11D6-BBC8-0003930FDAB2@netventures.com.au> (raw)
In-Reply-To: <00ba01c1a92b$31c58280$05a00017@idlonh>
On Wednesday, January 30, 2002, at 12:12 PM, lonh SENG wrote:
> Hi all,
>
> I have one table containing data as "source.txt" attached file. I
> want to create a script to clean the data and get the result as
> "result.txt" attached file.
> inbtime and inbtime1 is datetime data type.
> Anyone has an idea?
> Any help will be appreciated.
> thanks in advance
It looks like you are going to need to look into using a cursor, and
perl DBI or equiv. Alternatively, you could create a function in
PL/PGSQL.
Where do you get the date for the end of the interval for the last
inbtime ordered by time?
==============================
David Stanaway
Personal: david@stanaway.net
Work: david@netventures.com.au
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: david@netventures.com.au, pgsql-sql@postgresql.org, slonh@camgsm.com.kh
Subject: Re: [ADMIN] SQL Script
In-Reply-To: <3D4F50BE-1526-11D6-BBC8-0003930FDAB2@netventures.com.au>
References: <00ba01c1a92b$31c58280$05a00017@idlonh> <3D4F50BE-1526-11D6-BBC8-0003930FDAB2@netventures.com.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox