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

column names with - and (

From: "maria s" <psmg01(at)gmail(dot)com>
To: "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: column names with - and (
Date: 2008-07-29 16:06:57
Message-ID: d9d42a0f0807290906v1a1efabbm1304ddc2ab0f0b9@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-sql
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

Responses

pgsql-sql by date

Next:From: Oliveiros CristinaDate: 2008-07-29 16:27:38
Subject: Re: column names with - and (
Previous:From: Emi LuDate: 2008-07-29 13:39:04
Subject: Re: Query prepared plan

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