Hi Tom,
Thanks again, I did not appreciate the dual function of "AT TIME ZONE" when
the input is timestamptz then the function converts from one timezone to
another (not what I wanted),
but when the input is timestamp the function acts more like a cast than a
convert (exactly what I wanted)
I
Felix,
You might want to look at EnterpriseDB, which is PostgreSQL with
Oracle compatibility extensions.
www.enterprisedb.com
LewisC
--- Felix Zhang <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm a newbie of PostgreSQL. I'm searching materials about porting
> from
> Oracle to PostgreSQL.
> Any
chrisj <[EMAIL PROTECTED]> writes:
> When I first saw your solution I thought it was logically going to do
> (notice the parentheses):
> select ('2006-07-13 09:20:00'::timestamp) at time zone 'EST5EDT';
> which does not help
Well, actually, that's exactly what it does. AT TIME ZONE is an
op
I forgot to mention that you would have to maintain a counter of each inserted
row and stop when you reach 60% of N (where N the cardinality of your source
table).
-- Προωθημένο Μήνυμα --
Subject: Re: [SQL] [GENERAL] How to split a table?
Date: Τρίτη 17 Οκτώβριος 2006 12:09
Fr
"Gregory S. Williamson" <[EMAIL PROTECTED]> writes:
> A crude approach would be to add a column to the original table; then update
> that based on the rand() call:
>
> update foo set i_am_a_60 = 1 where (rand() <= 0.60);
> create table foo_60 as select * from foo where i_am_a_60 = 1;
> create tabl
am Tue, dem 17.10.2006, um 10:44:52 +0200 mailte Thomas Kellerer folgendes:
> On 17.10.2006 10:36 Andreas Kretschmer wrote:
> >
> >http://techdocs.postgresql.org/#convertfrom
> >
>
> I just noticed that the link "Porting from Oracle PL/SQL" still points
> to the 7.4 manuals. Shouldn't that be up
A crude approach would be to add a column to the original table; then update
that based on the rand() call:
update foo set i_am_a_60 = 1 where (rand() <= 0.60);
create table foo_60 as select * from foo where i_am_a_60 = 1;
create table foo_40 as select * from foo where i_am_a_60 <> 1;
The CASE c
am Tue, dem 17.10.2006, um 1:53:35 -0700 mailte Gregory S. Williamson
folgendes:
> Perhaps something like:
>
> CREATE TABLE foo2 AS SELECT * FROM foo WHERE (rand() <= 0.60);
Then we have 2 tables: one with 100% data and one with around 60% ;-)
If the table contains a primary key you can delete
Στις Τρίτη 17 Οκτώβριος 2006 11:34, ο/η Andreas Kretschmer έγραψε:
> Felix Zhang <[EMAIL PROTECTED]> schrieb:
> > Hi,
> >
> > I want to split a table to 2 small tables. The 1st one contains 60%
> > records which are randomly selected from the source table.
> > How to do it?
>
> Why do you want to d
to do some statistics analysis.
2006/10/17, Andreas Kretschmer <[EMAIL PROTECTED]>:
Felix Zhang <[EMAIL PROTECTED]> schrieb:
> Hi,>> I want to split a table to 2 small tables. The 1st one contains 60% records> which are randomly selected from the source table.> How to do it?Why do you want to do th
Perhaps something like:
CREATE TABLE foo2 AS SELECT * FROM foo WHERE (rand() <= 0.60);
?
HTH,
Greg Williamson
DBA
GlobeXplorer LLC
-Original Message-
From: [EMAIL PROTECTED] on behalf of Andreas Kretschmer
Sent: Tue 10/17/2006 1:34 AM
To: pgsql-general@postgresql.org; pgsql-sq
Felix Zhang <[EMAIL PROTECTED]> schrieb:
> Hi all,
>
> I'm a newbie of PostgreSQL. I'm searching materials about porting from Oracle
> to PostgreSQL.
> Anyone can share with me some good documatations?
http://techdocs.postgresql.org/#convertfrom
Andreas
--
Really, I'm not out to destroy Micr
Felix Zhang <[EMAIL PROTECTED]> schrieb:
> Hi,
>
> I want to split a table to 2 small tables. The 1st one contains 60% records
> which are randomly selected from the source table.
> How to do it?
Why do you want to do this?
Andreas
--
Really, I'm not out to destroy Microsoft. That will just
Hi all,
I'm a newbie of PostgreSQL. I'm searching materials about porting from Oracle to PostgreSQL.
Anyone can share with me some good documatations?
Thanks and regards,
Felix
Hi,
I want to split a table to 2 small tables. The 1st one contains 60% records which are randomly selected from the source table.
How to do it?
Regards,
Felix
15 matches
Mail list logo