Create Quick View for SQL Batch File


The Quick View has an option to create a batch file, which can be used to automatically run an export of your data.

The batch file is created in the quick view program when you choose:
http://help.schooloffice.com/helpconsole/SDSStudentHelp/images/QVExport.png

This will allow you to automate the export of data.

1.  The batch file created by the quick view export is in the same folder as your database.

2.  The batch file will run the export and create a CSV, TXT (TAB), and a XML output/extraction from the system.

3.  It will also create a HTM page that can be used for easy viewing of the XML file.

4.  The batch file will copy the four output files (CSV, TXT, XML, and HTM) to a directory named FTP under the directory with the batch file.

Note: Using any text editor the batch file created can be adjusted by the district to copy the files to any location they desire.

If the word “list” is found in the report name it will be removed. For example export using the report “Student List by Homeroom” will create a report file name “Student by Homeroom”

The batch file name will be the report title plus the user's ID. The output files will be named with the report file name plus the appropriate extension of CSV, TXT, XML and HTM.

The path and drive letters in the batch file are based on the directory structure on the server. If the batch file is run from a workstation adjustments to the batch file may be needed.

This is a powerful tool that is adaptable to create data extractions for other software products you may have needs to refresh information on a regular basis.

 

The report Student by Homeroom run by user “xyz” will create the following.

     Batch file name: Student_by_Homeroom_by_xyz.bat

     TAB file name: Student_by_Homeroom_by_xyz.TXT

     CSV file name: Student_by_Homeroom_by_xyz.CSV

     XML file name: Student_by_Homeroom_by_xyz.XML

     HTM file name: Student_by_Homeroom_by_xyz.HTM


This is a sample of the batch file.
Note: The double quotes are needed in the parameter string for the program

SWC_XML.exe.
swc_xml.exe "1|Student_by_Homeroom_by_ xyz"
copy C:\SDSADMIN\STUDENT\Usr_Disp\_Master\Flash\Student_by_Homeroom_by_xyz.csv C:\SDSADMIN\STUDENT\ftp /y
copy C:\SDSADMIN\STUDENT\Usr_Disp\_Master\Flash\Student_by_Homeroom_by_xyz.xml C:\SDSADMIN\STUDENT\ftp /y
copy C:\SDSADMIN\STUDENT\Usr_Disp\_Master\Flash\Student_by_Homeroom_by_xyz.htm C:\SDSADMIN\STUDENT\ftp /y
copy C:\SDSADMIN\STUDENT\Usr_Disp\_Master\Flash\Student_by_Homeroom_by_xyz.txt C:\SDSADMIN\STUDENT\ftp /y