Subject | migration from dialect 1 to 3 |
---|---|
Author | Richard Salt |
Post date | 2008-01-18T13:24:15Z |
Hi
I am using Firebird 1.5.4 and converting an existing database
structure from dialect 1 to dialect 3. All is going well apart from
one issue with syntax as follows:
Assuming I have 2 tables, mytable1 & mytable2, each with 2 fields as
follows: myfield1 varchar(10), myfield2 double precision
The following query works on dialect 1 but fails on dialect 3 with the
error: Invalid command. Data type unknown.
select
mytable1.myfield1,
sum(mytable1.myfield2),
0.00 /* dummy to satisfy union */
from mytable1
group by
mytable1.myfield1
union
select
mytable2.myfield1,
0.00, /* dummy to satisfy union */
sum(mytable2.myfield2)
from mytable2
group by
mytable2.myfield1
Can anyone explain why please?
Incidentally, if myfield2 is a decimal type. This query runs ok on
dialect 3.
Thanks in advance for any help.
Richard Salt
I am using Firebird 1.5.4 and converting an existing database
structure from dialect 1 to dialect 3. All is going well apart from
one issue with syntax as follows:
Assuming I have 2 tables, mytable1 & mytable2, each with 2 fields as
follows: myfield1 varchar(10), myfield2 double precision
The following query works on dialect 1 but fails on dialect 3 with the
error: Invalid command. Data type unknown.
select
mytable1.myfield1,
sum(mytable1.myfield2),
0.00 /* dummy to satisfy union */
from mytable1
group by
mytable1.myfield1
union
select
mytable2.myfield1,
0.00, /* dummy to satisfy union */
sum(mytable2.myfield2)
from mytable2
group by
mytable2.myfield1
Can anyone explain why please?
Incidentally, if myfield2 is a decimal type. This query runs ok on
dialect 3.
Thanks in advance for any help.
Richard Salt