Coalesce with Timestamp,Nulls,and Concatenation

From: Pam Wampler <Pam_Wampler(at)taylorwhite(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Coalesce with Timestamp,Nulls,and Concatenation
Date: 2002-04-17 14:13:57
Message-ID: 2E4528861499D41199D200A0C9B15BC001551060@taylorwhite.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

can someone please give the correct syntax for a query that has a column
timestamp that allows nulls and
needs to be converted to a certain format and also needs to be concatenated
with commas

example:

select to_char(timestamp1,'YYYYMMDD
HH24:MI')||','||employee||','||to_char(timestamp2,'YYYYMMDD HH24:MI') from
employee;

How do I put the coalesce & also get the correct format and handle if the
timestamps are nulls to ""?

thanks

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message pg sql 2002-04-17 14:21:45 Re: [DOCS] Upgrading - How? - Administrator's Guide ??
Previous Message Rob 2002-04-17 12:30:36 Email in postgres