Subject | Re: [firebird-support] Upgrading Firebird 1.54 to 2.03 - Query plan |
---|---|
Author | Woody |
Post date | 2007-12-11T18:21:32Z |
neal.criscuolo wrote:
Choose the correct join type for your situation (left, right, etc.)
select J.JOB_ID,
J.JOB_NUMBER,
C.SHORT_NAME as CUSTOMER_NAME,
B.BRANCH_NAME,
S.DESCRIPTION as JOB_STATUS,
J.CUST_REF_NO
from JOB J
left join CUSTOMER C on (C.CUSTOMER_ID = J.CUSTOMER_ID)
left join BRANCH B on (B.BRANCH_ID = J.BRANCH_ID)
left join JOBSTATUS S on (S.JOB_STATUS_CODE = J.JOB_STATUS_CODE)
where (J.JOB_ID LIKE '544%')
order by J.JOB_ID DESCENDING
HTH
Woody (TMW)
> I am currently evaluating the process of upgrading from Firebird 1.54Rewrite the query using newer join syntax:
> to 2.03 and have hit a problem. Having saved a 1.54 database and
> restored it to 2.03 everything so far seems to work well except the
> following query:
>
> select J.JOB_ID,
> J.JOB_NUMBER,
> C.SHORT_NAME as CUSTOMER_NAME,
> B.BRANCH_NAME,
> S.DESCRIPTION as JOB_STATUS,
> J.CUST_REF_NO
> from JOB J,
> CUSTOMER C,
> BRANCH B,
> JOBSTATUS S
> where J.JOB_ID LIKE '544%'
> and C.CUSTOMER_ID = J.CUSTOMER_ID
> and B.BRANCH_ID = J.BRANCH_ID
> and S.JOB_STATUS_CODE = J.JOB_STATUS_CODE
> order by J.JOB_ID DESCENDING
>
>
> Can anyone shed any light on why this might be happening?
>
Choose the correct join type for your situation (left, right, etc.)
select J.JOB_ID,
J.JOB_NUMBER,
C.SHORT_NAME as CUSTOMER_NAME,
B.BRANCH_NAME,
S.DESCRIPTION as JOB_STATUS,
J.CUST_REF_NO
from JOB J
left join CUSTOMER C on (C.CUSTOMER_ID = J.CUSTOMER_ID)
left join BRANCH B on (B.BRANCH_ID = J.BRANCH_ID)
left join JOBSTATUS S on (S.JOB_STATUS_CODE = J.JOB_STATUS_CODE)
where (J.JOB_ID LIKE '544%')
order by J.JOB_ID DESCENDING
HTH
Woody (TMW)