Click or drag to resize
SQL1

[This is preliminary documentation and is subject to change.]

The TOPICA Basic function SQL1 runs a SQL query on the database, and returns the value of the first column of the first row in the returned record set.

Syntax
SQL1(sqlQuery [,connectionString])

Result type: Any.

Parameters

Name

Type

Description

sqlQuery

String

SQL query to be executed

connectionString

String

Alternative connection string - used when reading from a database that is NOT the default for the application, or when special conectino is needed to the current database.

Returns

The value of the first column of the first row in the returned record set.

Type: Any.

Examples
SQL1("SELECT COUNT(*) FROM Patient)")

Result: Number of patients in the database.