LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 19 Jul 2004 13:05:53 -0400
Reply-To:     Bob_Abelson@HGSI.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Bob Abelson <Bob_Abelson@HGSI.COM>
Subject:      Re: What is wrong with my proc sql?
Content-Type: text/plain; charset="us-ascii"

Here's another mnemonic:

Certain San Franciso Women Get Holidays Off.

Bob Abelson HGSI 240 314 4400 x1374 bob_abelson@hgsi.com

Venky Chakravarthy <venky.chakravarthy@PFIZER.COM> Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> 07/19/2004 12:08 PM Please respond to Venky Chakravarthy

To: SAS-L@LISTSERV.UGA.EDU cc: Subject: Re: What is wrong with my proc sql?

A co-worker, who took a SQL course from SI, had scribbled the following in the course notes as a mnemonic aid for the order of the SQL statements starting with the FROM statement.

French Women Grow Hairy Oranges

On Fri, 16 Jul 2004 10:39:43 -0400, Sigurd Hermansen <HERMANS1@WESTAT.COM> wrote:

>Andrea: >Sometimes I have to run a SAS SQL SELECT query through a syntax check to >make sure that it observes the precedence of SELECT clauses: Create ... >Select ... From ... Where ... Group ... or CSFWG. Although shamelessly >egomnemonical, the memory aid that first occurred to me was >Call Sig for Westat guru. (I'm sure that I'll regret posting this on a >Friday. 'fatuous', 'fake', 'fraudulent', or 'goofball' would work just as >well!) >Sig > > >-----Original Message----- >From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of >Wainwright, Andrea >Sent: Friday, July 16, 2004 9:46 AM >To: SAS-L@LISTSERV.UGA.EDU >Subject: Re: What is wrong with my proc sql? > > >Apparently I had to swap the from and the where. Never realized that >before. > >-----Original Message----- >From: Wainwright, Andrea >Sent: Friday, July 16, 2004 9:41 AM >To: 'SAS-L@LISTSERV.UGA.EDU' >Subject: What is wrong with my proc sql? > > > proc sql; > create table y.usm as > select varA, > varB, > RESIDENCE_ID > where substr(residence_id,13,1)='9' > _____ > 22 > 76 >ERROR 22-322: Syntax error, expecting one of the following: a quoted string, >!, !!, &, (, *, **, +, ',', -, '.', /, <, <=, <>, =, > >, >=, ?, AND, AS, BETWEEN, CONTAINS, EQ, FORMAT, FROM, GE, >GT, IN, INFORMAT, INTO, IS, LABEL, LE, LEN, LENGTH, > LIKE, LT, NE, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=. > >ERROR 76-322: Syntax error, statement will be ignored. > >17 from data.mydata; >NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of >statements. > >************************************************************************** >The information transmitted herewith is sensitive information intended only >for use by the individual or entity to which it is addressed. If the reader >of this message is not the intended recipient, you are hereby notified that >any review, retransmission, dissemination, distribution, copying or other >use of, or taking of any action in reliance upon this information is >strictly prohibited. If you have received this communication in error, >please contact the sender and delete the material from your computer.


Back to: Top of message | Previous page | Main SAS-L page