migratation of database from oracle9i to postgreSQL8.0.3

From: zenith Das <zenith_das(at)yahoo(dot)com>
To: Jaime Casanova <systemguards(at)gmail(dot)com>, "lucas(at)presserv(dot)org" <lucas(at)presserv(dot)org>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: migratation of database from oracle9i to postgreSQL8.0.3
Date: 2005-11-09 13:55:18
Message-ID: 20051109135518.47672.qmail@web51114.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi
Can anyone help me out........
How can i migrate database from oracle9i to postgreSQL8.0.3 where the table structure may differ in certain way...............

Jaime Casanova <systemguards(at)gmail(dot)com> wrote:
On 11/8/05, lucas(at)presserv(dot)org wrote:
> Hi
> Looking the e-mail I remembered a question.
> I saw that "select extract (week from now()::date)" will return the
> week number
> of current year. But, how can I convert a week to the first reference
> date. Ex:
> select extract(week from '20050105'::date); -- 5 Jan 2005
> --Returns--
> date_part |
> 1 |
>
> It is the first week of year (2005), and how can I get what is the first date
> references the week 1? Ex:
> select ???? week 1
> --should return---
> date |
> 20050103 | -- 3 Jan 2005
>
> Thank you.
> Lucas Vendramin
>
>

Extracted from:
http://www.postgresql.org/docs/8.0/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT

--- begin extracted text ---

week
The number of the week of the year that the day is in. By definition
(ISO 8601), the first week of a year contains January 4 of that year.
(The ISO-8601 week starts on Monday.) In other words, the first
Thursday of a year is in week 1 of that year. (for timestamp values
only)

Because of this, it is possible for early January dates to be part of
the 52nd or 53rd week of the previous year. For example, 2005-01-01 is
part of the 53rd week of year 2004, and 2006-01-01 is part of the 52nd
week of year 2005.

SELECT EXTRACT(WEEK FROM TIMESTAMP '2001-02-16 20:38:40');
Result: 7

--- end extracted text ---

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Fernando Garcia 2005-11-09 14:22:27 Como ejecutar una funcion insert en plpgsql....
Previous Message Achilleus Mantzios 2005-11-09 08:35:17 Re: Migrating database from postgresql 7.4.6 to postgresql