You are here: Driver Reference > ODBC Driver > Data Retrieval Examples > Query an Oracle Database using the Row & Column Lookup Method

Query an Oracle Database using the Row & Column Lookup Method

This example demonstrates how ClearSCADA might be configured to query data in an Oracle database, using the Row & Column Lookup Method.

Example:

An Oracle database includes the following database table:

Table Name: SCADADATA

ValueId

Value

PrevValue

State

1

10

15

Low

5

21

20

Normal

2

17

19

Low

10

99

90

High

Within ClearSCADA, an ODBC Query is configured to:

  • Retrieve the ValueId and Value columns of data from the SCADADATA table
  • Sort the retrieved data by ascending ValueId column order.

    To do this, the ODBC Query is configured to use this SQL query request:

    This request returns the following results table to the ClearSCADA ODBC driver:

ValueId

Value

1

10

2

17

5

21

10

99

Within ClearSCADA, an ODBC Analog point is configured to return the value from the row ValueId 5. To do this, the point is configured to use a Row & Column Lookup Method with these settings:

This results in the ODBC Analog point having a value of 21.


ClearSCADA 2015 R2