MACSCRPT Archives

February 2008

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
David Livesay <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Sun, 17 Feb 2008 08:42:56 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
On Feb 16, 2008, at 7:50 PM, Christopher Green wrote:

> One of the things AS spoiled me with from early on is
> "whose clauses" (apparently also known as the by-test
> reference form). My question is, for those of you who
> reeeeally know other scripting/programming languages,
> what other languages have this funcionality as a basic
> feature??
>
> Anyone?

The "WHERE" clause in SQL is essentially the same thing.

SELECT lastname FROM users WHERE firstname LIKE 'Chris%'

This means roughly the same thing as...

get the lastname of every user whose firstname begins with 'Chris'

But the thing I love about SQL is that it omits articles and copulae.  
I call it a Tonto language, because most statements come out sounding  
like that character's speech in the Lone Ranger radio and TV series.  
Tarzan language would be equally applicable.

SQL also has a "HAVING" clause for restricting grouped data.

SELECT a, sum(b) FROM thistable GROUP BY a HAVING a < 100

ATOM RSS1 RSS2