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

Re: SQL Script

From: "lonh SENG" <slonh(at)camgsm(dot)com(dot)kh>
To: "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: SQL Script
Date: 2002-01-30 03:37:41
Message-ID: 002001c1a93f$79369aa0$05a00017@idlonh (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-sql
Thank all of you very much. It works now.
----- Original Message ----- 
From: "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: "lonh SENG" <slonh(at)camgsm(dot)com(dot)kh>
Cc: <pgsql-admin(at)postgresql(dot)org>
Sent: Wednesday, January 30, 2002 9:14 AM
Subject: Re: [ADMIN] SQL Script


> 
> On Wed, 30 Jan 2002, 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
> >
> >     Sorry. It seems to be out of the topic.
> 
> Probably belongs on pgsql-sql, but... :)
> 
> This is not at all optimized, but maybe something of the form:
> 
> select t1.card, t1.inbtime, coalesce((select min(inbtime) from t t2 where
> t2.inbtime>t1.inbtime and t2.card=t1.card), t1.inbtime) from t t1;
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 
> 


In response to

pgsql-admin by date

Next:From: Andy RuhlDate: 2002-01-30 04:19:16
Subject: Re: Sample database for me to practice with?
Previous:From: Stephan SzaboDate: 2002-01-30 02:14:15
Subject: Re: SQL Script

pgsql-sql by date

Next:From: Brian McCaneDate: 2002-01-30 09:13:51
Subject: Listing Triggers
Previous:From: Stephan SzaboDate: 2002-01-30 02:14:15
Subject: Re: SQL Script

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