Subject | what is wrong in this select? |
---|---|
Author | danyschaer |
Post date | 2008-02-27T16:26:48Z |
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
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