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

Re: column names with - and (

From: "Oliveiros Cristina" <oliveiros(dot)cristina(at)marktest(dot)pt>
To: "maria s" <psmg01(at)gmail(dot)com>,"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-07-29 16:27:38
Message-ID: 004301c8f198$045791f0$ (view raw, whole thread or download thread mbox)
Lists: pgsql-sql

The minus, open bracket and close bracket are illegal as identifier names


  ----- Original Message ----- 
  From: maria s 
  To: Osvaldo Rosario Kussama ; pgsql-sql(at)postgresql(dot)org ; Pavel Stehule ; Ivan Sergio Borgonovo 
  Sent: Tuesday, July 29, 2008 5:06 PM
  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,

In response to


pgsql-sql by date

Next:From: maria sDate: 2008-07-29 16:35:40
Subject: Re: column names with - and (
Previous:From: maria sDate: 2008-07-29 16:06:57
Subject: column names with - and (

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