You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect 'localhost/3051:horses' user 'sysdba' password 'masterkey';
Database: 'localhost/3051:horses', User: sysdba
SQL> set term ^;
SQL> execute block
CON> returns (c integer)
CON> as
CON> DECLARE VARIABLE b boolean;
CON> DECLARE function f1() returns boolean as
CON> begin
CON> return true;
CON> end
CON> begin
CON> c = 0;
CON> b = f1();
CON> --IF (f1()) THEN c = 1;
CON> IF (b) THEN c = 1;
CON> suspend;
CON> end^
C
============
1
SQL> execute block
CON> returns (c integer)
CON> as
CON> DECLARE VARIABLE b boolean;
CON> DECLARE function f1() returns boolean as
CON> begin
CON> return true;
CON> end
CON> begin
CON> c = 0;
CON> b = f1();
CON> IF (f1()) THEN c = 1;
CON> --IF (b) THEN c = 1;
CON> suspend;
CON> end^
Statement failed, SQLSTATE = 22000
Dynamic SQL Error
-SQL error code = -104
-Invalid usage of boolean expression
Submitted by: @sim1984
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect 'localhost/3051:horses' user 'sysdba' password 'masterkey';
Database: 'localhost/3051:horses', User: sysdba
SQL> set term ^;
SQL> execute block
CON> returns (c integer)
CON> as
CON> DECLARE VARIABLE b boolean;
CON> DECLARE function f1() returns boolean as
CON> begin
CON> return true;
CON> end
CON> begin
CON> c = 0;
CON> b = f1();
CON> --IF (f1()) THEN c = 1;
CON> IF (b) THEN c = 1;
CON> suspend;
CON> end^
============
1
SQL> execute block
CON> returns (c integer)
CON> as
CON> DECLARE VARIABLE b boolean;
CON> DECLARE function f1() returns boolean as
CON> begin
CON> return true;
CON> end
CON> begin
CON> c = 0;
CON> b = f1();
CON> IF (f1()) THEN c = 1;
CON> --IF (b) THEN c = 1;
CON> suspend;
CON> end^
Statement failed, SQLSTATE = 22000
Dynamic SQL Error
-SQL error code = -104
-Invalid usage of boolean expression
Commits: 8738972 FirebirdSQL/fbt-repository@2a7039a
The text was updated successfully, but these errors were encountered: