Viewing spatial data as images (Interactive SQL)

In Interactive SQL, you can view a geometry as an image using the Spatial Preview tab to understand what the data in the database represents.

Prerequisites

You must have SELECT privilege on the table you are selecting from, or the SELECT ANY TABLE system privilege.

Task

Each instance of Interactive SQL is associated with a different connection to a database. When you open an instance of the Spatial Viewer from within Interactive SQL, that instance of Spatial Viewer remains associated with that instance of Interactive SQL, and shares the connection to the database.

When you execute a query in the Spatial Viewer, if you attempt to execute a query in the associated instance of Interactive SQL, you get an error. Likewise, if you have multiple instances of the Spatial Viewer open that were created by the same instance of Interactive SQL, only one of those instances can execute a query at a time; the other instances must wait for the query to finish.

Note: By default, Interactive SQL truncates values in the Results pane to 256 characters. If Interactive SQL returns an error indicating that the full column value could not be read, increase the truncation value. To do this, click Tools » Options and click SAP Sybase IQ in the left pane. On the Results tab, change Truncation Length to a high value, such as 5000. Click OK to save your changes, execute query again, and then double-click the row again.
  1. Connect to your database in Interactive SQL.
  2. Execute a query to select spatial data from a table. For example:
    SELECT * FROM owner.spatial-table;
  3. Double-click any value in the Shapes column in the Results pane to open the value in the Value window.

    The value is displayed as text on the Text tab of the Value window.

  4. Click the Spatial Preview tab to see the geometry as a Scalable Vector Graphic (SVG).

The geometry is displayed as a Scalable Vector Graphic (SVG).

Next

The spatial data can be viewed as geometry by using the Previous Row and Next Row buttons to view other rows in the result set.