50 likes | 163 Views
CPSC 203. Xin 27 October, 2010. Import Data. Excel Access. Make-table queries. Query Table Practice Create a Class table for different semesters Select the data with a query Change the query type to Make Table Query Run the Query Set Class to be the Primary Key of the new table
E N D
CPSC 203 Xin 27 October, 2010
Import Data • Excel Access
Make-table queries • Query Table • Practice • Create a Class table for different semesters • Select the data with a query • Change the query type to Make Table Query • Run the Query • Set Class to be the Primary Key of the new table • Create five (5) queries, each showing • ID • Student • WebsiteRankX • Website Name
Union Queries • Many queries one query • Source queries have the same # of fields • The fields must be in the same order and data types • Union Queries must be done in SQL • Practice • Create a union query to combine the five queries just created • Create an empty query • Change the type to Union • Input the following SQL • SELECT QueryWeb1.* from QueryWeb1 • UNION • SELECT QueryWeb2.* from QueryWeb2 • UNION • SELECT QueryWeb3.* from QueryWeb3 • UNION • SELECT QueryWeb4.* from QueryWeb4 • UNION • SELECT QueryWeb5.* from QueryWeb5
Append Queries • Add records to an existing table • Practice • Create a blank table, WebRanking, containing • WebsiteRankID (Autonumber) • ID (Number) • Student (Number) • WebsiteRank (Text) • WebsiteName (Text) • Create a new query based on the union query • Change the type to Append • Relate fields in the union query and the table • Run the query to append data