Jumat, 30 November 2012

Re: [MS_AccessPros] write a program using a subquery entirely from Design View?

 

Dear Math Doctor- (name?)

Your problem is nonsensical because there can be no book in the table
whose price is greater than ALL books. Do you mean greater than all OTHER
books?

You can attempt to solve this by typing the SQL in the Criteria box.
Start a new query on your table. Drag the Title and Price fields to the
query grid. Clear the Show box under Price unless you also want to show
this. Now put this in the Criteria box under Price:

>(SELECT Max(Price) FROM MyTable As T2 WHERE T2.Title <> MyTable.Title)

Note that "MyTable" is the name of your table.

This will return no rows, however, if there is more than one book in the
table that has the same highest price. Problem left for you to solve.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: The Math Doctor <themathdoctor@yahoo.com>
Reply-To: <MS_Access_Professionals@yahoogroups.com>
Date: Friday, November 30, 2012 6:30 PM
To: <MS_Access_Professionals@yahoogroups.com>
Subject: [MS_AccessPros] write a program using a subquery entirely from
Design View?

I would like to show my students how to solve the following program in
Access' design mode without actually tweaking the SQL code, if possible.

A table stores the names of some books and their prices. Print the names
of all books whose price is greater than that of all the books in the
table.

Thanks.

------------------------------------

Yahoo! Groups Links

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar