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

Re: Alternative to AS?

From: Helgi Örn <sacredeagle(at)gmail(dot)com>
To: PostgreSQL - newbie <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Alternative to AS?
Date: 2010-10-06 09:30:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Well, I'm sorry if I wasn't clear enough but this is not what I was looking for.

2010/10/6 Lukasz Brodziak <lukasz(dot)brodziak(at)gmail(dot)com>:
> Hi,
> From You've written You want to convert time formatting. If that is
> the case thisarticle may be of help:
I've read this MANY times when I needed to create a TIME column and I
have to say; it's not written for newbies :)

What I actually need to know is the postgre (or SQL) alternative to AS
used in mysql.
My query (below) is accepted by postgre until AS where it stops (^)

ERROR:  syntax error at or near "AS"

Thank's for your effort,

> 2010/10/6 Helgi Örn <sacredeagle(at)gmail(dot)com>:
>> Hi! I am moving a database project from MySQL to PostgreSQL I was a
>> newbie there and now I am a newbie here :)
>> I have this form mysql:
>> SELECT tid_in, TIME_FORMAT(tid_in, '%H.%i')AS format FROM timmar;
>> Which I have gotten postgre to accept thus far:
>> SELECT pack_tidin TIME_FORMAT, pack_tidin '%H.%i', AS format FROM timmar;
>> it stops at AS which doesn't seem to exist is postgre, what is
>> postgres alternative to AS?
>> Thank's in advance,
>> Helgi Örn
>> --
>> Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
>> To make changes to your subscription:
> --
> Łukasz Brodziak
> II MU Bioinformatyka

In response to


pgsql-novice by date

Next:From: Christian RamseyerDate: 2010-10-06 11:40:46
Subject: Re: Alternative to AS?
Previous:From: Thomas KellererDate: 2010-10-06 09:26:52
Subject: Re: Alternative to AS?

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