Re: SQL problem?

Поиск
Список
Период
Сортировка
От Kretschmer Andreas
Тема Re: SQL problem?
Дата
Msg-id 20050824170804.GA4085@kaufbach.delug.de
обсуждение исходный текст
Ответ на SQL problem?  (cbraden <cbraden@douglasknight.com>)
Ответы Re: SQL problem?  (<operationsengineer1@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: cbraden
Дата:
Сообщение: SQL problem?
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: SQL problem?