我提出一个非常简单的疑问,即返回会任意重复行刑。 有时我没有重复,有时我重复了结果,重复记录每次都不同。 I m 主持冻结数据库的查询(数据没有变化)。 我的甲骨文版本是11g。
I have only one filter (in the WHERE clause) on a date:
to_char(date, yyyy/mm ) > = 2012/03
.
Any help would be appreciated. Thank you for your attention. Best regards.
<>Complete query
select distinct
B.ORD_V_COD_ROWID as c1,
B.ORD_D_DAT_INSERITO_RIFIUTATO as c2,
B.ORD_D_DAT_RIFIUTO_SIS as c3
from
NRFTF_ORD_ORDINE A,
NRFTF_COR_ORDINI_RDS B
where (A.ORD_N_DWH_NUM_ORDINE = B.ORD_N_DWH_NUM_ORDINE
and B.ORD_V_COD_CAUSALE = CLIENTE NON AFFIDABILE
and B.ORD_V_COD_STATO = RIFIUTATO
and B.RDS_C_DWH_FLG_CANCELLAZIONE = 0
and B.ORD_C_DWH_FLG_CANCELLAZIONE = 0
and B.ORD_V_COD_CAUSALE = CLIENTE NON AFFIDABILE
and B.PER_NAME_MONTH >= 2012/03
and (B.ORD_D_DAT_RIFIUTO_SIS >= TO_DATE( 2012-03-22 00:00:00 , YYYY-MM-DD HH24:MI:SS )
or B.ORD_D_DAT_INSERITO_RIFIUTATO >= TO_DATE( 2012-03-22 00:00:00 , YYYY-MM-DD HH24:MI:SS ))
and TO_CHAR (A.ord_d_dat_creazione, YYYY/MM ) >= 2012/03 )
order by c1, c2, c3