Re: date and time

Поиск
Список
Период
Сортировка
Искать
От
Thomas Kellerer
Тема
Re: date and time
Дата
Msg-id
fs8ffb$ji1$1@ger.gmane.org
Ответ на
Re: date and time (Alain Roger)
Список
Дерево обсуждения
date and time "Alain Roger" <raf.news@gmail.com>
Re: date and time Adrian Klaver <aklaver@comcast.net>
Re: date and time Raymond O'Donnell <rod@iol.ie>
Re: date and time "Alain Roger" <raf.news@gmail.com>
Re: date and time Raymond O'Donnell <rod@iol.ie>
Re: date and time Thomas Kellerer <spam_eater@gmx.net>
Re: date and time "Alain Roger" <raf.news@gmail.com>
Re: date and time Tony Caduto <tony_caduto@amsoftwaredesign.com>
Alain Roger wrote on 24.03.2008 15:45:
>> SELECT count(*) INTO existing_email FROM cust_portal.tmp_newsletterreg;
>>     if (existing_email <>0) then
>>     {
>>         result = false;
>>     }
>>     else
>>     {
>>         result = true;
>>         INSERT INTO cust_portal.tmp_newsletterreg VALUES
>>         (
>>             nextval( 'tmp_newsletterreg_nlreg_id_seq' ),
>>             email,
>>             session,
>>             SELECT CURRENT_TIMESTAMP;
>>         )
>>     }
>>     end if;
>>
>>     RETURN(result);


That should be

INSERT INTO cust_portal.tmp_newsletterreg VALUES
(
     nextval( 'tmp_newsletterreg_nlreg_id_seq' ),
     email,
     session,
     CURRENT_TIMESTAMP
)

There is no SELECT and no semicolon inside the INSERT

Thomas
В списке pgsql-general по дате отправления
От: Adrian Klaver
Дата:
Сообщение: Re: date and time
От: Raymond O'Donnell
Дата:
Сообщение: Re: date and time
FAQ