[fpc-pascal] Reopen issue 20500: TSQLParser cant Parse Statements containing "as"

Michael Van Canneyt michael at freepascal.org
Mon Oct 17 20:57:26 CEST 2011



On Mon, 17 Oct 2011, Reinier Olislagers wrote:

> The issue reporter gave this example:
> select ORDERNO as OrderNo from ORDERS as Orders;
> It does parse AS, but only for a field.
>
> Michael Van Canneyt replied:
> TSQLParser implements SQL syntax as used in Firebird, and firebird does
> not allow AS for a tablename, just append the alias.
>
> The correct syntax would be:
>
> select ORDERNO as OrderNo from ORDERS Orders;
>
> However:
> On my Firebird 2.5, this works perfectly (in FlameRobin and SQLWorkBench/J):
> select * from rdb$relations as tables;
>
> Would it make sense to reopen this bug?

? Eh ? If indeed it is accepted, then yes please.

Quite strange, because I implemented the SQL parser based on the 
official Firebird server docs. And it definitely was not allowed.

But I'll test on 2.5, and if it indeed works, I'll of course implement it.

Michael.



More information about the fpc-pascal mailing list