Re: column names with - and (

From: "maria s" <psmg01(at)gmail(dot)com>
To: "Igor Neyman" <ineyman(at)perceptron(dot)com>
Cc: "Osvaldo Rosario Kussama" <osvaldo(dot)kussama(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org, "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>, "Ivan Sergio Borgonovo" <mail(at)webthatworks(dot)it>
Subject: Re: column names with - and (
Date: 2008-08-01 17:29:36
Message-ID: d9d42a0f0808011029y79692978na875cf43b4324e64@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi Igor,
Thanks for the info.
I am using double quotes now and getting the result that I needed.

Thank you,
Maria

On Tue, Jul 29, 2008 at 3:14 PM, Igor Neyman <ineyman(at)perceptron(dot)com> wrote:

> Maria,
>
> Try "" (double quotes:
>
> select x1 as "IL-a", x2 as "IL-a(p30)" from abc
>
> should help.
>
> Igor
>
>
>
> ------------------------------
> *From:* pgsql-sql-owner(at)postgresql(dot)org [mailto:
> pgsql-sql-owner(at)postgresql(dot)org] *On Behalf Of *maria s
> *Sent:* Tuesday, July 29, 2008 12:07 PM
> *To:* Osvaldo Rosario Kussama; pgsql-sql(at)postgresql(dot)org; Pavel Stehule;
> Ivan Sergio Borgonovo
> *Subject:* [SQL] column names with - and (
>
> Hi All,
> When I am fetching the data from a table,
> I am giving the column names with - and ( and ) like IL-a, IL-a(p30) etc..
>
> select x1 as IL-a, x2 as IL-a(p30) from abc
>
> But I am getting
>
> ERROR: syntax error at or near "-" and also t "(" , ")"
>
> Can anyone help me to fix this?
>
> Thank you,
> Maria
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2008-08-02 01:07:08 Re: [SQL] Savepoints and SELECT FOR UPDATE in 8.2
Previous Message EXT-Rothermel, Peter M 2008-08-01 17:02:04 Savepoints and SELECT FOR UPDATE in 8.2