Subject | Re: [Firebird-Java] Creating procedures through java executeQuery() |
---|---|
Author | Jim Starkey |
Post date | 2005-06-16T14:14:14Z |
advis10 wrote:
Firebird SQL per so. ISQL was designed as a throw away tool for the
original development of DSQL. The primary interactive tool was QLI that
contained full native SQL. Rather than extend QLI as Interbase as
extended, Borland neglected QLI in favor of ISQL. ISQL doesn't actually
parse anything; it just shoves whatever is enter across the DSQL
interface and hopes for the best. Since it allows multi-line statements
but doesn't parse the SQL, it has no way of knowing when it has reached
end of statement other than semi-colon as an end of statement marker.
This, of course, doesn't work for statements like procedures that have
internal semi-colons. To get around this, Borland decided to let you
change the statement terminator so internal semi-colons don't terminate
the statement.
The Firebird SQL implementation never sees either "set term" or the
silly "!!" sequence. In any context other than ISQL they are
syntactically illegal.
--
Jim Starkey
Netfrastructure, Inc.
978 526-1376
>That idiotic syntax is specific to ISQL and has nothing to do with
> SET TERM !! ;
> CREATE PROCEDURE getServerName RETURNS (name VARCHAR(100)) AS
> BEGIN
> SELECT name FROM SERVER INTO :name;
> END!!
>
> SET TERM ; !!
>
Firebird SQL per so. ISQL was designed as a throw away tool for the
original development of DSQL. The primary interactive tool was QLI that
contained full native SQL. Rather than extend QLI as Interbase as
extended, Borland neglected QLI in favor of ISQL. ISQL doesn't actually
parse anything; it just shoves whatever is enter across the DSQL
interface and hopes for the best. Since it allows multi-line statements
but doesn't parse the SQL, it has no way of knowing when it has reached
end of statement other than semi-colon as an end of statement marker.
This, of course, doesn't work for statements like procedures that have
internal semi-colons. To get around this, Borland decided to let you
change the statement terminator so internal semi-colons don't terminate
the statement.
The Firebird SQL implementation never sees either "set term" or the
silly "!!" sequence. In any context other than ISQL they are
syntactically illegal.
--
Jim Starkey
Netfrastructure, Inc.
978 526-1376