Re: What is the best way to merge two disjoint tables?

Поиск
Список
Период
Сортировка
Искать
От
Rodrigo De León
Тема
Re: What is the best way to merge two disjoint tables?
Дата
Msg-id
a55915760709071246x1d57a519i94f0090f088e4060@mail.gmail.com
Ответ на
Список
Дерево обсуждения
What is the best way to merge two disjoint tables? Chansup Byun <Chansup.Byun@sun.com>
Re: What is the best way to merge two disjoint tables? "Rodrigo De León" <rdeleonp@gmail.com>
Re: What is the best way to merge two disjoint tables? Chansup Byun <Chansup.Byun@Sun.COM>
Re: What is the best way to merge two disjoint tables? "Rodrigo De León" <rdeleonp@gmail.com>
On 9/7/07, Chansup Byun  wrote:
> One more question: Is there a way to make the  T2.U_ID + 1000  number to be incremental from a given number instead of adding 1000?

See here:
http://archives.postgresql.org/pgsql-sql/2007-05/msg00194.php

Then, say we want to start from 49:

SELECT   COALESCE(T1.U_USER, T2.U_USER) AS U_USER
       , COALESCE(T1.U_ID
                , CASE
                    WHEN T2.U_ID IS NOT NULL
                      THEN 48 + ROWNUM()
                  END
                 ) AS U_ID
    FROM TABLEA T1 FULL JOIN TABLEB T2 ON T1.U_USER = T2.U_USER
ORDER BY U_ID
В списке pgsql-general по дате отправления
От: Chansup Byun
Дата:
От: Collin Peters
Дата:
Сообщение: Auto vacuum documentation
FAQ