logo       

RE: Fun with SQL: msg#00066

programming.language-of-the-year

Subject: RE: Fun with SQL


SELECT NAME FROM STUDENTS WHERE DAYS_TARDY > 3 AND DAYS_TARDY >
LAST_TARDY_MSG_SENT

<send messages>

UPDATE STUDENTS SET LAST_TARDY_MSG_SENT = DAYS_TARDY WHERE DAYS_TARDY > 3 AND
DAYS_TARDY > LAST_TARDY_MSG_SENT


Am I missing something? That took me about 20 seconds. (I can't touch type.)
And the query couldn't be more easily understood.

Of course, I realize that that proves nothing. I just assumed I had a
database designed with my query in mind. I realize that depending on the
table structure you might end up w/ something pretty convoluted. But my point
was that it isn't the syntax that's getting in the way, it's failure to
understand the metaphor of the language.

(Of course the success of MS Access vs. pure SQL undermines this point almost
completely -- so please no one bring it up.)

-----Original Message-----
From: Chris Morris [mailto:chrismo-jPI29ImzmbLYtjvyW6yDsg@xxxxxxxxxxxxxxxx]
Sent: Wednesday, June 23, 2004 12:47 AM
To: pragprog-hHKSG33TihhbjbujkaE4pw@xxxxxxxxxxxxxxxx
Subject: Re: [pragprog] Fun with SQL


Ron Jeffries wrote:

>On Tuesday, June 22, 2004, at 3:55:33 PM, Frohnhofer, James wrote:
>
>
>
>> B) its primary metaphor of rows, tables and keys is consistent,
pervasive
>>and easily grasped.
>>
>>
>
>On what planet is it true that SQL has been successful with real end users?
>I don't think I've /ever/ encountered real end users who weren't getting
>their SQL done by DB specialists.
>
>
And sometimes not easily grasped by DB specialists.

Show me the SQL for this: "I need to see all students who have had three
or more tardies, and send the student a report of those tardies. Then I
need to make sure I don't resend a tardy report to the same student,
unless they've accrued additional tardies."

Granted, it's a long couple of sentences, but I think the concept is
pretty straightforward in humanville. Getting the right SQL statement
(vs. one that /seems/ right but really isn't) can be tricky (or at least
it was to a dunderhead like me :-)

--
Chris
http://clabs.org/blogki





Yahoo! Groups Links






==============================================================================
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==============================================================================



------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->


Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/pragprog/

<*> To unsubscribe from this group, send an email to:
pragprog-unsubscribe-hHKSG33TihhbjbujkaE4pw@xxxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise