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

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 (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-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

pgsql-interfaces by date

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

pgsql-general by date

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

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