Hi Ray,
I can only tell you what I see from the outside looking in, not from the
source code.
A view and a query are quite different animals, even though booth have the
commonality of a SQL select statement. In the case of a view, this is
managed by the database engine directly, whether that be HSQLDB, MySQL 5,
PostgreSQL or any other engine that Base works with that supports them. So
in this case Base would simply take your select statement and wrap it in a
CREATE VIEW ... statement then pass it to the engine for processing. There
would be no need for any type of analysis of the actual select statement. In
the case of HSQLDB there is no support for replaceable parameters in a view.
A query on the other hand is managed by Base directly. Whether this is a
QueryDefinition object or a literal string representing an SQL select
statement passed to a XStatement there is the option of having Base analyze
it for replaceable parameter tags. This is controlled by the Boolean
property EscapeProcessing.
So, in the first case of using double pipes for concat the Base query
analyzer does not recognize them, as noted in the issue you referenced. If
you set the EscapeProcessing property to false for a query however, there
would be no analysis done and the HSQLDB engine would happily perform the
concatenation of the strings.
In the case of the replaceable parameters we have just the reversed
situation. A view does not support these, by design. A query on the hand
must have EscapeProcessing set true for these to be recognized and the user
prompted for their replacement values before passing the select statment
along to the engine, otherwise the engine will return an error upon
receiving the unaltered command string.
HTH
Drew
On 9/15/06, Jahn, Ray (R.) <[EMAIL PROTECTED]> wrote:
Issues:
* string concatenation || in Select statements
* host variables and paramenters in Where criteria
Does OO Base use different codes to parse
SQL statements about View and Query?
Ray
Reference:
www.openoffice.org/issues/show_bug.cgi?id=59211
string concatenation || in Query section
-----
Select "column 01" || ' add-on string'
From "table 01";
working in View creation (Table section)
not working in Query creation
-----
Select "column 01"
From "table 01"
Where "table 01"."column 01" Like :xx_host_variable;
not working in View creation (Table section)
working in Query creation
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]