Creating and running SQL queries against an IMS database

You can access and manipulate data that is stored in an IMS database by creating and running SQL queries in IMS Explorer.

To create and run custom SQL queries against the IMS database:

  1. Create a data development project.
    The data development project is required to create and run custom SQL scripts.
    1. Create a data development project. From the main menu, click File > New > Data Development Project.
    2. Enter a name for the data development project.
    3. Click Next.
    4. Select the connection name of the IMS database.
    5. Click Finish.
  2. Create an SQL script by using the SQL Query Builder.
    In the SQL script, specify the SQL query statements to run against the IMS database.
    1. In the Data Project Explorer view, expand the data development project that you created in 1
    2. Create an SQL script. Right-click the SQL Scripts folder and select New > SQL or XQuery Script.
    3. Enter a name for the SQL script.
    4. Use one of the following options to create an SQL script:
      • To enter the SQL statement as text, select SQL and XQuery editor.
      • To graphically create the SQL statement, select SQL Query Builder.
      Tip: More graphical semantic help is provided if you use the query builder.
    5. Click Finish.
  3. To view the results in the SQL Results view, right-click the script that you created in 2. Select Run SQL to execute the script.