Subject | Re: [firebird-support] Re: Problem with Firebird used in MS Access via ODBC |
---|---|
Author | Helen Borrie |
Post date | 2003-10-15T07:06:44Z |
At 06:56 AM 15/10/2003 +0000, you wrote:
Is this the actual query statement that gets sent through the ODBC interface?'
You need to get it to accept correct, standard, unambiguous SQL:
SELECT
ADDRESS.NAME,
STATUS.STATUSNAME,
COUNTRY.COUNTRYNAME
FROM ADDRESS
LEFT JOIN STATUS
ON ADDRESS.STATUSID = status.STATUS.ID
LEFT JOIN COUNTRY
ON ADDRESS.COUNTRYID = country.COUNTRY.ID;
This query is going to return (potentially) a lot of nulls - I'm not sure
whether you regarded that as a problem or not. If you don't want the nulls
then you don't want the outer joins...
heLen
> > >What am I doing wrong?Two problems here: (1) bad syntax and (2) ambiguity
> > >
> > >Any ideas or hints?
> >
> > No. Tell us what the query is.
>
>The query in MS Access is:
>
>SELECT ADDRESS.NAME, STATUS.STATUSNAME, COUNTRY.COUNTRYNAME
>FROM (ADDRESS LEFT JOIN STATUS ON ADDRESS.STATUSID = STATUS.ID) LEFT
>JOIN COUNTRY ON ADDRESS.COUNTRYID = COUNTRY.ID;
Is this the actual query statement that gets sent through the ODBC interface?'
You need to get it to accept correct, standard, unambiguous SQL:
SELECT
ADDRESS.NAME,
STATUS.STATUSNAME,
COUNTRY.COUNTRYNAME
FROM ADDRESS
LEFT JOIN STATUS
ON ADDRESS.STATUSID = status.STATUS.ID
LEFT JOIN COUNTRY
ON ADDRESS.COUNTRYID = country.COUNTRY.ID;
This query is going to return (potentially) a lot of nulls - I'm not sure
whether you regarded that as a problem or not. If you don't want the nulls
then you don't want the outer joins...
heLen