Home

»

»

OTH – Running SQL Statements

OTH – Running SQL Statements

DB Explorer

DB Explorer can be used to query Vertex Rehab Management’s pathwaynt database. DB Explorer can be run from any machine that is set up as a Rehab Management client, but it must be installed first. Once installed, perform the following steps to execute a SQL statement:

  1. Open DB Explorer.
    • It can usually be found directly in the list of Windows programs from the Start button.
  2. Click the + sign beside Pathway.
  3. Provide the SYSDBA password (masterkey) and click OK.
  4. Click the Enter SQL tab in the DB Explorer window.
  5. Directly under the Enter SQL tab, in the large entry space, insert SQL statement you want to perform.
  6. Click the Execute Query button (it looks like a lightning bolt) on the right side of the window.
  7. To run further statements, repeat steps 5 and 6 as needed.
  8. When you have finished, close the DB Explorer window.

Other Notes:

  • DB Explorer can be installed from any Rehab Management CD, regardless of version.
  • On the left side of the DB Explorer window, under Pathway, click the plus sign beside Tables to display the list of tables in the database.
  • Click the plus sign beside any table’s name and then the plus sign beside Columns to display the field names in that table.
  • If you want to re-run a statement you ran previously, use the up and down arrows, near the Execute Query button, to go backward and forward through the statements you’ve performed during the current work session.
  • When using a SELECT statement to return a data set, the records displayed cannot be edited. 
  • Before running the query, activate the ‘Request live queries’ option to make the results editable (Options | Query…). Once you have made the desired record changes, be sure to deactivate the live queries option.
  1. IBConsole

    IBConsole can also be used to query the pathwaynt database. It is generally only available at the server, and can be a useful alternative if DB Explorer has not been installed at the server.

    1. Open IBConsole
      • It can usually be found at Start | Programs | Borland Interbase 7.5 Server [instance = gds_db]
    2. Connect to the local server (gds_db) by double-clicking it.
    3. Connect to the pathwaynt database by double-clicking it.
      • If you are prompted to log in, use the SYSDBA username (usually masterkey).
    4. Making sure PATHWAYNT.IB is selected, click the Interactive SQL button (it looks like a green figure running, with SQL in yellow beneath it).
    5. Type the SQL statement you want to run in the upper portion of the window.
    6. Click the  Execute Query button (it looks like a lightning bolt with a question mark beside it).
    7. To run further statements, repeat steps 5 and 6 as needed.
    8. When you have finished, use the Transactions menu to select ‘Rollback’.
      • This will prevent your queries from actually changing the database. This is generally the best course of action. However, if the purpose of the queries was to alter the database data, as with an UPDATE statement, rolling back cancels the effects of the query. In this case, you would select ‘Commit’, but only if you have a backup of the pathway database.
    9. Close the Interactive SQL window.

    Other Notes:

    • To display table and field names, you must work in the IBConsole window, not the Interactive SQL window.
    • For a list of table names, click Tables under PATHWAYNT.IB.
    • To list the fields in a table, double-click the table’s name. This opens a separate window where each field is listed.
    • If you want to re-run a statement you ran previously, use the left and right arrow buttons, directly to the left of the Execute Query button, to go backward and forward through the statements you’ve performed during the current work session.
  2. Microsoft SQL Server Management Studio

    SQL Server Management Studio can be used to query the Intuition database. It will usually only be found on the server where the SQL Server itself is installed, but can be installed on any machine that can communicate to the SQL Server machine, presuming the install CD for SQL Server is available.

    1. Open SQL Server Management Studio
      • It will most often be somewhere in the Programs list, in a program group for SQL Server, such as Start | Programs | Microsoft SQL Server 2005.
    2. Select the SQL Server name to which you want to log in.
    3. Click Connect.
    4. In the Object Explorer, which is generally at the left side of the screen, click the plus sign beside Databases.
    5. Right-click the Intuition database.
      • This will generally be called ‘VertexRehabManagement’.  
    6. Select ‘New Query’ from the right-click menu.
    7. Type the query statement in the resulting window, which usually appears to the right.
    8. Click the Execute button to run the statement.
    9. To run further statements, repeat steps 7 and 8 as needed.
    10. Close the SQL Server Management Studio window.
    11. If you are prompted to save the queries you’ve created, select No.

    Other Notes:

    • In the Object Explorer, click the plus sign beside the database name, then the plus sign beside Tables to display the list of tables in the database.
      • Click the plus sign beside any table’s name and then the plus sign beside Columns to display the field names in that table.
Scroll to Top
Skip to content