Using ODBC with Excel - psug-mi

7 downloads 34 Views 267KB Size Report
Using ODBC with Excel. I. Get student name, gender, and grade level. A. In Excel . - click Data, From other sources, From Microsoft Query. - choose the ...
Using ODBC with Excel

I. Get student name, gender, and grade level. A. In Excel - click Data, From other sources, From Microsoft Query

- choose the PowerSchool ODBC name (uncheck the wizard checkbox), click OK

- enter password for your PowerSchool access

- list of PowerSchool tables will appear – scroll down and select Students and click Add

- then click close

- drag field names down to lower grid – data will immediately display

- to narrow down the data to one building and currently enrolled students, click on View, Criteria

- this will insert a criteria area onto the screen - drag schoolid and enroll_status to the criteria area and enter appropriate values

- to sort the display of data, click on Last Name column to highlight, then click on the sort button

- to see this “query” in SQL, click the SQL button

- to return the data to Excel, click the Return Data button or click File | Return Data

II. Get list of girls in grade 6 using an SQL query A. In Excel - as above, start a new query (Data, From other sources, Microsoft Query, choose ODBC source name, enter password) - close the add tables window - click SQL - enter: SELECT PS.STUDENTS.LASTFIRST, PS.STUDENTS.GENDER, PS.STUDENTS.GRADE_LEVEL FROM PS.STUDENTS STUDENTS WHERE (PS.STUDENTS.GENDER='F') AND (PS.STUDENTS.GRADE_LEVEL=6) - and click OK - return date to Excel

III. Find all students with a grade of D or E. Find all seniors with an E. Find all students with a D or E in math A. In Excel - as above, start a new query (Data, From other sources, Microsoft Query, choose ODBC source name, enter password) - add the students table and add the stored grades table, then close the tables window - link the two tables by dragging the studentID field from the stored grades table to the ID field in the Students table - drag Last Name, First Name, Grade Level from the students table down to the lower grid - drag Grade, Course Name, Course Number, Teacher from the stored grades table down to the lower grid - click View, Criteria to add the criteria section - to limit to one building, drag schoolid down to the criteria grid and set appropriate value - to limit to current students, drag enroll_status down to the criteria grid and enter 0 - to limit grades to D or E, drag the grade field down to the criteria grid and enter >’CZ’ and