Re: [GENERAL] Re: [INTERFACES] ODBC Driver -- Access Order By problem solved!!!

From: "Cary B(dot) O'Brien" <cobrien(at)access(dot)digex(dot)net>
To: zztong(at)laxmi(dot)ev(dot)net (Bruce Tong)
Cc: maillist(at)candle(dot)pha(dot)pa(dot)us, lynch(at)lscorp(dot)com, byronn(at)insightdist(dot)com, pgsql-general(at)postgreSQL(dot)org, pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Re: [INTERFACES] ODBC Driver -- Access Order By problem solved!!!
Date: 1998-07-24 23:12:02
Message-ID: 199807242312.TAA06544@access2.digex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

> > > Since I'm learning SQL in my spare time, I tend to use these feature in MS
> > > Access and PgAccess to point me in the right direction or sometimes
> > > confirm, or deny my assertions.
> > >
> > > I like psql, but its not the kind of tool which suggests other
> > > alternatives. It just says "this part is bogus." That's fine, but when I
> > > fail to get it right after a dozen attempts, its nice to let something
> > > else take a stab at it.
> >
> > Please tell use what else psql can tell the user. We have \h and \d
> > commands.
>
> Example:
>
> zztong=> SELECT * FROM school SORT DESC BY school_lname;
> ERROR: parser: parse error at or near "desc"
>
> Follow this with 10 more seemingly reasonable attempts at guessing the
> correct syntax which all fail. Then I'm off to the books, or maybe I just
> run PgAccess and quickly design a view soley to see the SQL.
>

Hmm Did you try...

cary=> \h select
Command: select
Description: retrieve tuples
Syntax:
select [distinct on <attr>] <expr1> [as <attr1>], ... <exprN> [as <attrN>]
[into [table] <class_name>]
[from <from_list>]
[where <qual>]
[group by <group_list>]
[order by <attr1> [ASC | DESC] [using <op1>], ... <attrN> ]
[union [all] select ...];

That's pretty good help if you ask me, and shows that there is
no BY keyword in the order by clause.

Psql is pretty good, especially if you have the readline support or
run it from emacs. With the new query cancel it will be even better.

[snip]

-- cary

> The problem is not with psql, its with me.
>
> I mean if you want to have psql attempt to suggest the correct syntax
> based on my mistakes, I won't complain, but I really don't think it is
> needed and I'm certain I would become annoyed with the feature as I became
> more experienced.
>
> I have little need for generating SQL "on the fly" as I'm just putting it
> into a textfile to be run through psql from a makefile, or I'm burrying it
> in a program somewhere. Thus I spend little time with SQL, so I'm learning
> it slowly. I don't try to memorize things as I prefer to pick them up via
> usage and I try to keep lots of books around.
>

>
> Bruce Tong | Got me an office; I'm there late at night.
> Systems Programmer | Just send me e-mail, maybe I'll write.
> Electronic Vision / FITNE |
> zztong(at)laxmi(dot)ev(dot)net | -- Joe Walsh for the 21st Century
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 1998-07-24 23:58:02 Re: [GENERAL] Re: [INTERFACES] ODBC Driver -- Access Order By problem solved!!!
Previous Message Richard Lynch 1998-07-24 22:52:43 Re: [GENERAL] Re: [INTERFACES] ODBC Driver -- Access Order By problem solved!!!

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bruce Momjian 1998-07-24 23:58:02 Re: [GENERAL] Re: [INTERFACES] ODBC Driver -- Access Order By problem solved!!!
Previous Message Richard Lynch 1998-07-24 22:52:43 Re: [GENERAL] Re: [INTERFACES] ODBC Driver -- Access Order By problem solved!!!