Crash using duplicate field names in Union Sql
Erne
ernestogiannotta at tiscalinet.it
Mon Aug 20 06:49:16 CDT 2007
Hello Ruslan,
I just found a bug that makes Vale crash when executing a Union Sql.
This one crashes:
select a.recid, b.recid from myBO1 a, myBO2 b, myB_myB_Linker ab
where a.recid = 1
union (select a.recid, b.recid from myBO1 a, myBO2 b, myB_myB_Linker
ab where a.recid = 2)
This one works:
select a.recid as aid, b.recid as bid from myBO1 a, myBO2 b,
myB_myB_Linker ab where a.recid = 1
union (select a.recid as aid, b.recid as bid from myBO1 a, myBO2 b,
myB_myB_Linker ab where a.recid = 2)
Difference is that 2nd query uses "as aid" and "as bid" fields
aliases for the Recid
in fact this one also crashes:
select a.Field1, c.Field1 from myBO1 a, myBO2 b, myBO3 c,
myB_myB_Linker ab, myB_myB_Linker1 ac where a.recid = 1
union (select a.Field1, c.Field1 from myBO1 a, myBO2 b, myBO3 c,
myB_myB_Linker ab, myB_myB_Linker1 ac where a.recid = 2)
because it uses 2 "Field1" fields with the same name from 2 different
tables
I think it should work since the difference is defined by the "a.",
"b." and "c." Table aliases,
and anyway it shouldn't crash ;-)
Cool Runnings,
Erne.
/ |\ |\ | /
– |/ | \ | –
\ |\ | \| \
More information about the Valentina
mailing list