[bug in 5.90.0.57]: incorrect Detail operation or [FRQ ]
Posted: Fri 16 Apr 2010 04:04
BDS2006 + WinXP
Hello
I found maybe a bug or FRQ of the master-detail operation.
The master sql is:
//------------------
select lac, ci from cells_wcdma
//------------------
The detail sql is:
//------------------
select c.*
from
(
select
c_wcel.wcel_rnc_id as source_rnc_id,
c_adjs.wcel_wbts_id as source_wbts_id,
c_adjs.wcel_wcel_id as source_wcel_id,
c_adjs.source_lac as source_lac,
c_adjs.source_ci as source_ci,
c_adjs.adjs_rnc_id as dest_rnc_id,
c_adjs.adjs_ci as dest_ci
from
c_adjs, c_wcel
where
c_adjs.source_lac=:lac
and
c_adjs.source_ci=:ci
and
c_adjs.wcel_id=c_wcel.obj_gid
) c
left join
(
select count(*) as total,
hos_id as source_rnc_id,
scid_id as source_cell_id,
hot_id as dest_rnc_id,
tcid_id as dest_cell_id
from nokrww_ps_autsh2_dmnc3_raw
where datetime>=:starttime and datetime=:starttime and datetime<:endtime
group by hos_id, scid_id, lac_id,ci_id
) b
on (c.source_rnc_id=b.source_rnc_id
and
c.source_ci=b.source_cell_id
and
c.dest_lac=b.dest_lac
and
c.dest_ci=b.dest_ci
)
where
(
b.source_rnc_id is null) AND lac = :lac and ci = :ci
//------------------
Such additional "AND lac = :lac and ci = :ci" at SQL end has caused error.
So if it is a bug, please kindly check it.
And if it is a FRQ of "extended" master-detail operation, that if the detail fields are already in the Params, then we can stop adding the last additional condition and make the SQL works.
Such FRQ is very useful, if the actually detail operation is very complex as mine.
Please kindly review it.
Hello
I found maybe a bug or FRQ of the master-detail operation.
The master sql is:
//------------------
select lac, ci from cells_wcdma
//------------------
The detail sql is:
//------------------
select c.*
from
(
select
c_wcel.wcel_rnc_id as source_rnc_id,
c_adjs.wcel_wbts_id as source_wbts_id,
c_adjs.wcel_wcel_id as source_wcel_id,
c_adjs.source_lac as source_lac,
c_adjs.source_ci as source_ci,
c_adjs.adjs_rnc_id as dest_rnc_id,
c_adjs.adjs_ci as dest_ci
from
c_adjs, c_wcel
where
c_adjs.source_lac=:lac
and
c_adjs.source_ci=:ci
and
c_adjs.wcel_id=c_wcel.obj_gid
) c
left join
(
select count(*) as total,
hos_id as source_rnc_id,
scid_id as source_cell_id,
hot_id as dest_rnc_id,
tcid_id as dest_cell_id
from nokrww_ps_autsh2_dmnc3_raw
where datetime>=:starttime and datetime=:starttime and datetime<:endtime
group by hos_id, scid_id, lac_id,ci_id
) b
on (c.source_rnc_id=b.source_rnc_id
and
c.source_ci=b.source_cell_id
and
c.dest_lac=b.dest_lac
and
c.dest_ci=b.dest_ci
)
where
(
b.source_rnc_id is null) AND lac = :lac and ci = :ci
//------------------
Such additional "AND lac = :lac and ci = :ci" at SQL end has caused error.
So if it is a bug, please kindly check it.
And if it is a FRQ of "extended" master-detail operation, that if the detail fields are already in the Params, then we can stop adding the last additional condition and make the SQL works.
Such FRQ is very useful, if the actually detail operation is very complex as mine.
Please kindly review it.