Subject | Re: [firebird-support] Ambiguous field names in selection statement errors on 2.5.1 |
---|---|
Author | Helen Borrie |
Post date | 2013-02-05T19:42:55Z |
At 08:22 a.m. 6/02/2013, Paul R. Gardner wrote:
select f.*
from first_table f
left join ambiguous_fields_table1 a1 on f.foo = a1.bar
left join ambiguous_fields_table2 a2 on f.foo = a2.bar
In any case, look at the Firebird and system logs for clues to the lead-up to the network [mis]behaviour; and check that your temp space is configured, available (permissions?) and adequate.
Check also that the total length of the statement that the *server* receives (with all parameters replaced by their argument values) is less than the 64KB limit. Count whitespace and CR/LFs.
./heLen
./heLen
>Hi all,Just to eliminate an extraneous cause, try the full disambiguating syntax:
>
>I have two tables that have some duplicated column names by design. The server is a Win2008 server. I have numerous clients, running Win XP and Win 7. SOME of the clients have the following problem and some do NOT. I cannot figure out the difference between the two types of client though. The Firebird version is 2.5.1 64 bit, and all clients have the same client dll file. Firebird 1.5, 2.0, and 2.5.1 32 bit do not have this issue.
>
>The issue I have is that when I run the following statement from some clients, I get an error saying "Unable to complete network request to host [Server's IP]. Error writing data to the connection. An existing connection was forcibly closed by the remote host.":
>
>select *
>from first_table f
>left join ambiguous_fields_table1 a1 on f.foo = a1.bar
>left join ambiguous_fields_table2 a2 on f.foo = a2.bar
>
>Just for fun, I removed the "select *" and manually typed all fields in both tables. (e.g. select a1.foo, a2.foo, ). This gave the same error. I then found that if I remove any of these ambiguous fields, the error goes away. It only happens if I have all of them typed in. Any field removed causes the query to start working. Have I found some sort of bug? There are around 20 fields in each table with around 5 being ambiguous.
>
>I'm not a fan of the (select *) syntax, but it's unfortunately needed for this query. Any ideas anyone?
select f.*
from first_table f
left join ambiguous_fields_table1 a1 on f.foo = a1.bar
left join ambiguous_fields_table2 a2 on f.foo = a2.bar
In any case, look at the Firebird and system logs for clues to the lead-up to the network [mis]behaviour; and check that your temp space is configured, available (permissions?) and adequate.
Check also that the total length of the statement that the *server* receives (with all parameters replaced by their argument values) is less than the 64KB limit. Count whitespace and CR/LFs.
./heLen
./heLen