Re: column names with - and ( - Mailing list pgsql-sql

From maria s
Subject Re: column names with - and (
Date
Msg-id d9d42a0f0808011029y79692978na875cf43b4324e64@mail.gmail.com
Whole thread Raw
In response to Re: column names with - and (  ("Igor Neyman" <ineyman@perceptron.com>)
List 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@perceptron.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@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of maria s
Sent: Tuesday, July 29, 2008 12:07 PM

To: Osvaldo Rosario Kussama; pgsql-sql@postgresql.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

pgsql-sql by date:

Previous
From: "EXT-Rothermel, Peter M"
Date:
Subject: Savepoints and SELECT FOR UPDATE in 8.2
Next
From: "Scott Marlowe"
Date:
Subject: Re: Savepoints and SELECT FOR UPDATE in 8.2