Re: SQL problem? - Mailing list pgsql-novice

From Kretschmer Andreas
Subject Re: SQL problem?
Date
Msg-id 20050824170804.GA4085@kaufbach.delug.de
Whole thread Raw
In response to SQL problem?  (cbraden <cbraden@douglasknight.com>)
Responses Re: SQL problem?  (<operationsengineer1@yahoo.com>)
List pgsql-novice
cbraden <cbraden@douglasknight.com> schrieb:

> Folks,
>
> I have a simple table called "adjusters" with only these three columns:
>
> id
> adjuster
> MonthlyGoal
>
> ==========COPIED FROM PGAdminIII=============
> CREATE TABLE public.adjusters
> (
> id int4 NOT NULL DEFAULT nextval('adjusters_id_key'::text),
> "Adjuster" varchar(50),
> "MonthlyGoal" varchar(50),
> CONSTRAINT adjusters_pkey PRIMARY KEY (id)
> ) WITH OIDS;
> ==============================================
>
> The SQL "SELECT * FROM adjusters" works perfectly
>
> The SQL "SELECT * FROM adjusters ORDER BY Adjuster ASC" results in this
> message:
> ERROR: Attribute "adjuster" not found

Because 'adjuster' is not the same as 'Adjuster'. But, no problem:

SELECT * FROM adjusters ORDER BY "Adjuster" ASC;


Column names are case-sensitive.
Btw.: SELECT * is evil...



Regards, Andreas.
--
Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau-
fenden Pinguins aus artgerechter Freilandhaltung.   Er ist garantiert frei
von Micro$oft'schen Viren. (#97922 http://counter.li.org)     GPG 7F4584DA
Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)

pgsql-novice by date:

Previous
From: cbraden
Date:
Subject: SQL problem?
Next
From: Stephan Szabo
Date:
Subject: Re: SQL problem?