I guarantee that once word gets around that there's a database with student, test, and historical information, you'll get requests to pull data and load it into a spreadsheet or something similar. Because most programs will accept a comma-delimited file, all you have to do is create an output file with commas between each field, and either a single or double quote for the character or non-numeric data. Here's a sample script: rem Script to create a comma-delimited file rem from the student records rem for use in office spreadsheets. set heading off set pagesize 0 set feedback off set echo off SPOOL C:\STUDENT_SSN.DAT T SELECT ''''L_NAME''''','SSNUM FROM STUDENTS; SPOOL OFF;
What you have to remember is that there are rules for quotes: If you need a single quote, you have to use four single quotes to get one. If you need a double quote, you must do this: '"' ” that is, a single quote then a double quote then a single quote. Notice that the comma is also put in single quotes. Here's the output file for the sample script I just showed you:
So go ahead, pull all the data that anyone needs from any of the tables. Just be mindful of getting your quotation marks straight! |