Subject Why is it invalid?
Author danyschaer
Hi Forum!,

I Firebird says this syntaxis is wrong, but I think it is simple and
standard sql (Isn't it?); PostgreSQL and Oracle accepts it:

(select "TPRO"."DSCR" as "D_TPRO",cast(' ' as character(1)) as "NUME"
from "PROC" left outer join "TPRO" on "PROC"."TPRO"="TPRO"."TPRO"
where "PROC"."PROC"='1KZM64V704')
union
(select "TPRO"."DSCR" as "D_TPRO", "OTIP"."NUME" from "OTIP" left
outer join "TPRO" on "OTIP"."TPRO"="TPRO"."TPRO"
where "OTIP"."PROC"='1KZM64V704')
order by "NUME"

What I get is:

*** IBPP::SQLException ***
Context: Statement::Prepare( (select "TPRO"."DSCR" as "D_TPRO",cast
(' ' as character(1)) as "NUME" from "PROC" left outer join "TPRO"
on "PROC"."TPRO"="TPRO"."TPRO" where "PROC"."PROC"='1KZM64V704')
union (select "TPRO"."DSCR" as "D_TPRO", "OTIP"."NUME" from "OTIP"
left outer join "TPRO" on "OTIP"."TPRO"="TPRO"."TPRO"
where "OTIP"."PROC"='1KZM64V704') order by "NUME" )
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 1, column 1
(


Execute time: 00:00:00.


What is wrong?
Thank you!!!

Dany