Execute SQL

One of the advantages of using XpertMart is that it runs on any SQL database. This means that expert users who are familiar with Structured Query Language can execute SQL commands directly into the database. These commands can be used to verify data in the database or even to make modifications to the database. Most users will never need to use this feature. You should only execute SQL commands if you have prior experience using them.

To execute an SQL command directly, go to Processes>System Processes>Execute SQL:

This will open up the XpertQuery window you use for other operations. However, in this case there is an extra button, the Execute SQL button as shown below:

When you click on the Execute SQL button a new window will open. The window will contain the SQL statement previously created through the XpertQuery module. If no selection criteria has previously been created, you will only see "SELECT * FROM" in the window. You can erase any text that is there and manually enter your own SQL statement. This command will be sent directly to the database you are connected to. (Obviously, the success of the SQL command and the results it creates are the user's responsibility).

You can also use XpertQuery to build the SQL statement before clicking on the Execute SQL button. Then open the Execute SQL window and make any edits you'd like.

If the SQL command you execute returns data you can view these by clicking on the Results tab in XpertQuery, as shown below:

The Execute SQL command is very powerful and therefore potentially very dangerous since it makes irrevocable changes to your database. (There is no "undo"). Therefore, access to the Execute SQL command should be restricted using the Security module.

Copyright © 2004 Dinari Systems LLC

* Return to Table of Contents *