Re: Alternative to AS?

From: Helgi Örn Helgason <helgi(at)helgason(dot)nu>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Alternative to AS?
Date: 2010-10-06 19:43:29
Message-ID: AANLkTin_qG011z4HQKEkQDfwB7SRtJHUv7wszGQA=SO4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 6 October 2010 21:07, Thomas Kellerer <spam_eater(at)gmx(dot)net> wrote:
> 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"?
>
It didn't work and the outcome was none at all. Before, the prompt had
changed from ekobas=# to ekobas'#?

> 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
>
I AM SO VERY SORRY TO ALL OF YOU GUYS!
I made a dreadful mistake when I created this tabel I call "timmar"
(hours, that's working hours), it includes three TIME columns which I
created in phpPgAdmin which shows very small letters on my computer.
Two of these columns started with capital P instead of p. Terrible
mistake, me bad :(

This works very well:
SELECT tid_in, to_char(tid_in, 'HH24.MI') AS format FROM timmar;

Thank you all for your effort.

/HÖ

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jean-Yves F. Barbier 2010-10-06 19:56:28 Re: recurse in a single query
Previous Message Thomas Kellerer 2010-10-06 19:42:12 Re: recurse in a single query