LucidDbAppLib EXEC SQL IF NO ROWS

From Eigenpedia

Jump to: navigation, search

Contents

Syntax

call applib.exec_sql_if_no_rows(<see parameters below>);

Purpose

Conditionally execute a SQL statement if the first statement is empty.

Parameters

  • evalSql [VARCHAR(4096)]: SQL that will return a resultSet
  • execSql [VARCHAR(4096)]: SQL that will be executed if evalSql == 0 rows

Example

call exec_sql_if_no_rows(
        'SELECT * FROM SYS_ROOT.DBA_SCHEMAS WHERE SCHEMA_NAME =''FRED'''
        ,'CREATE SCHEMA "FRED"'
  );

Source Code

http://p4web.eigenbase.org/open/dev/luciddb/src/com/lucidera/luciddb/applib/util/ExecSqlIfNoRows.java

Personal tools