Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group