On 24/03/2008 14:45, Alain Roger wrote:
INSERT INTO cust_portal.tmp_newsletterreg VALUES
(
  nextval( 'tmp_newsletterreg_nlreg_id_seq' ),
  email,
  session,
  SELECT CURRENT_TIMESTAMP;
> )

Hi Alain,

That won't work; you just need

  ... values (.... email, session, CURRENT_TIMESTAMP)

CURRENT_TIMESTAMP is a function, so it's return value will be used where it appears.

What procedural language are you using? If it's pl/pgsql then the curly brackets aren't needed, nor are the parentheses in the return statement. Also, there's a semi-colon missing after the INSERT statement, which may or may not cause problems.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
[EMAIL PROTECTED]
---------------------------------------------------------------

-
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to