Re: column does not exist error

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Dave Coventry <dgcoventry(at)gmail(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: column does not exist error
Date: 2009-11-18 13:31:12
Message-ID: 4B03F720.7060407@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 18/11/2009 13:23, Dave Coventry wrote:
> Tearing my hair out, can anyone see what I'm doing wrong?
>
> SELECT title FROM node WHERE type=client;

You need to quote literal values:

SELECT title FROM node WHERE type='client';

Otherwise PG thinks you're referring to a column called "client", as you
saw.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Naoko Reeves 2009-11-18 13:31:57 Re: column does not exist error
Previous Message Vidhya Bondre 2009-11-18 13:30:50 Re: column does not exist error