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

Re: Alternative to AS?

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Alternative to AS?
Date: 2010-10-06 19:07:04
Message-ID: i8ihcq$vrq$1@dough.gmane.org (view raw or flat)
Thread:
Lists: pgsql-novice
Helgi Örn, 06.10.2010 20:36:
>> SELECT tid_in, to_char(tid_in, 'HH24.MI') AS format FROM timmar;
>>
> This does not work at all.

"Does not work" is not a valid Postgres error message.
What exactly is "not working"?

postgres=> create table timmar ( tid_in time );
CREATE TABLE
postgres=> insert into timmar values (TIME '23:24');
INSERT 0 1
postgres=> commit;
COMMIT
postgres=> SELECT to_char(tid_in, 'HH24.MI') AS format FROM timmar;
  format
--------
  23.24
(1 row)

If this is not what you want, you need to be more detailed.

Thomas


In response to

Responses

pgsql-novice by date

Next:From: Jean-Yves F. BarbierDate: 2010-10-06 19:25:44
Subject: recurse in a single query
Previous:From: Helgi ÖrnDate: 2010-10-06 18:36:46
Subject: Re: Alternative to AS?

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