Subject RE: [firebird-support] what is wrong in this select?
Author Mercea Paul
Does not make sense but u can try, if u want to keep that statement
something like this

select * from (
(select "ESTA"."PROC" from "ESTA" where "ESTA"."TEST" = '0002tem3IL')
union
(select "ESTA"."PROC" from "ESTA" where "ESTA"."TEST" = '0002tKr&uQ')
) from rdb$database



Regards,

Paul





From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of danyschaer
Sent: Wednesday, February 27, 2008 6:27 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] what is wrong in this select?



Hi All,

Maybe one of you can tell me what is wrong it this sintaxis:

select * from (
(select "ESTA"."PROC" from "ESTA" where "ESTA"."TEST" = '0002tem3IL')
union
(select "ESTA"."PROC" from "ESTA" where "ESTA"."TEST" = '0002tKr&uQ')
)

It works very well in other engines, but with Firebird, I get:

Starting transaction...
Preparing query: select * from (
(select "ESTA"."PROC" from "ESTA" where "ESTA"."TEST" = '0002tem3IL')
union
(select "ESTA"."PROC" from "ESTA" where "ESTA"."TEST" = '0002tKr&uQ')
)
*** IBPP::SQLException ***
Context: Statement::Prepare( select * from (
(select "ESTA"."PROC" from "ESTA" where "ESTA"."TEST" = '0002tem3IL')
union
(select "ESTA"."PROC" from "ESTA" where "ESTA"."TEST" = '0002tKr&uQ')
) )
Message: isc_dsql_prepare failed

SQL Message : -104
Invalid token

Engine Code : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -104
Token unknown - line 3, column 1
union

Execute time: 00:00:00.

It does not make sense to me that "union" is an unknown token.

Thank you!

Dany





[Non-text portions of this message have been removed]