Tuesday, November 29, 2011


Query 2:
Select Title, PublDate, LastName, PubName
From Book, Author, Publisher
Where PublDate > #11/29/2011# And
Book.AuthorCode = AuthorId And
Publisher.PubId = Book.PubId
ORDER BY PublDate DESC

Select Title, PublDate, LastName, PubName
From Book, Author, Publisher
Where PublDate > DATE() And
Book.AuthorCode = AuthorId And
Publisher.PubId = Book.PubId
ORDER BY PublDate DESC

Query 3:
Select Title, PublDate, Copyright, LastName, PubName
From Book, Author, Publisher
Where
(Copyright = 2010 OR Date()-PublDate Between 0 And 60 ) And
Book.AuthorCode = AuthorId And
Publisher.PubId = Book.PubId
ORDER BY PublDate DESC

Query 4:
Select Title, LastName, PubName
From Book, Author, Publisher
Where PubName ="Wiley" And
Title Like "*Excel 2007*"
Book.AuthorCode = AuthorId And
Publisher.PubId = Book.PubId
ORDER BY Title ASC

Query 5:
Is Null
ISNULL(fieldname)

Select Title, Edition, LastName, PubName
From Book, Author, Publisher
Where ISNULL(Edition)=True And
Book.AuthorCode = AuthorId And
Publisher.PubId = Book.PubId
ORDER BY Title ASC

within access, -1 means True
0 means false

Select Title, Edition, LastName, PubName
From Book, Author, Publisher
Where Edition Is Null And
Book.AuthorCode = AuthorId And
Publisher.PubId = Book.PubId
ORDER BY Title ASC

w3schools.com

Serial numbers in access and excel
is the offset of days since January 0, 1900
dates
times are fractions of days

Parameters in Queries
We have finished (more or less) SELECT queries

UPDATE, DELETE, DROP TABLE, CREATE TABLE
INSERT

2 comments:

  1. whens our next quiz?

    ReplyDelete
  2. i'll try to announce it on Thursday. probably next Tuesday.

    ReplyDelete