Subject | Re: [ib-support] Select syntax |
---|---|
Author | Claudio Valderrama C. |
Post date | 2001-12-22T02:59:47Z |
""Luiz Alves"" <cprmlao@...> wrote in message
news:00e301c18a6e$1fc11df0$010aa8c0@......
:-)
select*from rdb$database;
^^^
select(1)from rdb$database;
^^^^^
create domain d char(10) default'no_space';
^^^^
select udf(values)from rdb$database;
^^^
select quart_head_cnt[1]from proj_dept_budget;
^^^
are all valid statements. The parser needs an space to separate token, but
when the token itself is a delimiter like parenthesis, brackets, single
quotes, double quotes or the asterisk (that cannot be combined with another
operator), the parser doesn't need and doesn't enforce a space.
When in doubt, please try isql. The advantage of isql is that it doesn't
interpret the SQL statement. In other words, isql doesn't parse SQL, it only
does a primitive parsing to detect if it received one of its own commands
(like SHOW) and if it didn't, it will pass the original command line to the
engine.
If you are seeing an AV in IBO you can consider that an IBO bug. However,
IBO probably is being a bit less flexible albeit more reasonable when it
comes to parsing. Unfortunately, the engine rules, so a third-party package
is expected to support the engine's syntax.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing
news:00e301c18a6e$1fc11df0$010aa8c0@......
> I noted a sql statement as:I'm going to paraphrase Doug: unfortunately, our DSQL parser sucks.
> select* from agenda
>
> Using IBO:
> 1. with ib_cursor, there is no error.
> 2 .with a query form, there is an AV.
>
> Using IBaccess and IBConsole, no error is reported.
:-)
select*from rdb$database;
^^^
select(1)from rdb$database;
^^^^^
create domain d char(10) default'no_space';
^^^^
select udf(values)from rdb$database;
^^^
select quart_head_cnt[1]from proj_dept_budget;
^^^
are all valid statements. The parser needs an space to separate token, but
when the token itself is a delimiter like parenthesis, brackets, single
quotes, double quotes or the asterisk (that cannot be combined with another
operator), the parser doesn't need and doesn't enforce a space.
When in doubt, please try isql. The advantage of isql is that it doesn't
interpret the SQL statement. In other words, isql doesn't parse SQL, it only
does a primitive parsing to detect if it received one of its own commands
(like SHOW) and if it didn't, it will pass the original command line to the
engine.
If you are seeing an AV in IBO you can consider that an IBO bug. However,
IBO probably is being a bit less flexible albeit more reasonable when it
comes to parsing. Unfortunately, the engine rules, so a third-party package
is expected to support the engine's syntax.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing