At 10:08 AM 25/06/2009, [email protected] wrote:
>Hi,
>
>One of our team members (Dick) actually found it: the problem is related
>to queries having more than one field with the same name (even when
>they're prefixed differently).

Actually, it's a slight misinterpretation of the problem.  What you call 
"prefixes" are not prefixes, they are qualifiers....

>Let me explain: a reader reading the output of:
>
>select o.id, marker.id from marker, object o where marker.id = o.id 
>will fail
>
>The same will be true for:
>select o.id, marker.* from marker, object o where marker.id = o.id

>, and it didn't on previous versions nor with other databases.

You need to read the release notes and the migration notes for Fb 2.1.  This 
syntax (mixing relation names and relation aliases as qualifiers) is contrary 
to the SQL standards and is no longer allowed.  It was forewarned as long ago 
as Fb 1.5 (2004)....in the past, then engine has returned warnings about it 
(which most data access layers ignore)...now, it causes an exception.

Either of these forms is legal:

a) using relation names only:

select object.id, marker.id from marker, object
where marker.id = object.id

b) using aliases only:

select o.id, m.marker.id from marker m, object o 
where m.id = o.id

Any other combination (including omitting qualifers) will cause an exception.

Also, it is strongly recommended that you stop using the obsolete SQL-89 
implicit join syntax, for lots of good reasons, amongst which is how much 
easier it is to spot your syntax mistakes and fix them. 

select o.id, m.marker.id 
  from marker m join object o 
  on m.id = o.id

Helen

  


------------------------------------------------------------------------------
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to