Using Script Manager


Click your browser's 'Back' button to return to the previous page.

The Script Manager utility is available to the System Administrator and can be used to edit or delete data directly in the database instead of going through the User Interface.

 

PLEASE NOTE: Script Manager is a powerful utility and should only be used by someone with considerable experience using SQL scripts and queries as data edited or deleted with Script Manager is not protected by the user interface. Running a script against the database using Script Manager works directly on the database.

The Script Manager Dialog
The Script Manager dialog has three textboxes: The first one is used to write or create scripts (by clicking the Query Builder button); the second shows the results of running the script; and the third is a 'clipboard' where you can store text while you're creating or testing a script.

You can simply enter a valid SQL query into the Script textbox, or you can click the "Query Builder" button to open a utility that lets you create a query by choosing table and field names from drop-down lists. When you have made all of your selections, click "OK" to bring the query back into the script textbox.

When your query is ready to run, click the "Run" button. Scripts that begin with UPDATE, INSERT INTO or DELETE FROM will be tested BUT NOT COMPLETED until you click "Yes" to the prompt "Do you want to run this statement?". The impact of running the statement is displayed in the results textbox, showing that <n> records would be changed by this query.

Click 'Yes' to run the query.. you should see a "Query Successful!" in the results textbox when it's done.

If you've created a very complex query or one that you may run regularly to view a set of data, you can save the query by clicking the "Save" button. Use the browse dialog to select a location for the script, give it a name and click "Save" to save it. Saved queries can be run again by clicking the "Open" button to find and select them.

Viewing Data
You can use a "SELECT" statement to view records as well. The results will display in columns at the bottom; right-click in the data and choose "Select All", then choose "Copy" to copy the information to another document for printing.

Other Functions
Other functions that you can run from the Script Manager are:

Import Into <tablename> - This text opens the Import dialog and lets you import data directly into <tablename> when the user interface Import feature (on the Utilities toolbar) is not available for that table. All standard validation runs on the imported data just as it would if you used the Import Utility on the menu.

Export From <tablename> - This prompts you for a destination file and exports ALL of the data in the table to that file. Again, this is a way to export System data or other hidden tables that don't have a user interface to do so.

@NOW - This text will be replaced in your query by the current Date/Time value as a numeric value in Universal Time format, which is how the EditDate field values are stored. This gives you a way to update EditDate values if there are replication problems based on the date/time fields values.

 

Query Builder

The Query Builder dialog can help you create queries by displaying the table and field names in a wizard dialog.  Click here for more information on using Query Builder.
 

Click your browser's 'Back' button to return to the previous page.

 


Crow River Tech, LLC. Copyright© 2010. All Rights Reserved

Microsoft Windows XP/Vista/7, SQL Server 2005, Access, Outlook and Excel are trademarks of Microsoft Corporation. 

Any other product names are trademarks of their respective companies.