Subject | RE: [firebird-support] Query Stops Working on Vista |
---|---|
Author | Svein Erling Tysvær |
Post date | 2008-05-27T08:46:51Z |
Excepting that I would normally write
SELECT DISTINCT A.X, A.Y
FROM A
LEFT JOIN B ON A.X = B.X
WHERE B.X Is Null
(i.e. DISTINCT rather than DISTINCTROW that I didn't even know existed in Firebird and remove the redundant parenthesis)
this should be a normal way to find records that are part of A, but not in B. There may be other ways to do this in Firebird 2.1, but it should still work.
What I'm wondering about, is whether the problem is with Firebird or your ODBC client (I would be shocked if it was Firebird, but I've been shocked before). Does isql, IB_SQL or similar report an error as well? Maybe someone is able to give you some advice if you specify which ODBC client you use?
Set
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Robert
Sent: 27. mai 2008 10:31
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Query Stops Working on Vista
I have an application written originally for Jet via DAO, which has been
modified to use Firebird via ODBC. In various places a query of the form:
SELECT DISTINCTROW A.X, A.Y
FROM A LEFT JOIN B ON A.X = B.X
WHERE (((B.X) Is Null));
has been used to find the difference between to sets, A being a table,
and B being the result from a query. This has worked for many, many
years on everything from Win95 onwards, and continued to work when used
with a Firebird client running on Windows XP. However, it doesn't work
when the Firebird client is running on Vista. When the same SQL is
used with a Jet database on Vista all is still OK. The problem appears
to lie with the Is Null bit; it's as if the fields in the query result
which should be NULL are not NULL. Using a different field in B to
detect the NULL condition doesn't solve the problem.
I think I've found another (superior) way of meeting the requirement,
but I would like to understand why this SQL does not work on a Firebird
client running on Vista, because I use Is Null in other queries (of a
different form). Do you have any suggestions please?
Regards,
Robert.
SELECT DISTINCT A.X, A.Y
FROM A
LEFT JOIN B ON A.X = B.X
WHERE B.X Is Null
(i.e. DISTINCT rather than DISTINCTROW that I didn't even know existed in Firebird and remove the redundant parenthesis)
this should be a normal way to find records that are part of A, but not in B. There may be other ways to do this in Firebird 2.1, but it should still work.
What I'm wondering about, is whether the problem is with Firebird or your ODBC client (I would be shocked if it was Firebird, but I've been shocked before). Does isql, IB_SQL or similar report an error as well? Maybe someone is able to give you some advice if you specify which ODBC client you use?
Set
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Robert
Sent: 27. mai 2008 10:31
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Query Stops Working on Vista
I have an application written originally for Jet via DAO, which has been
modified to use Firebird via ODBC. In various places a query of the form:
SELECT DISTINCTROW A.X, A.Y
FROM A LEFT JOIN B ON A.X = B.X
WHERE (((B.X) Is Null));
has been used to find the difference between to sets, A being a table,
and B being the result from a query. This has worked for many, many
years on everything from Win95 onwards, and continued to work when used
with a Firebird client running on Windows XP. However, it doesn't work
when the Firebird client is running on Vista. When the same SQL is
used with a Jet database on Vista all is still OK. The problem appears
to lie with the Is Null bit; it's as if the fields in the query result
which should be NULL are not NULL. Using a different field in B to
detect the NULL condition doesn't solve the problem.
I think I've found another (superior) way of meeting the requirement,
but I would like to understand why this SQL does not work on a Firebird
client running on Vista, because I use Is Null in other queries (of a
different form). Do you have any suggestions please?
Regards,
Robert.