Hello,
this query below "kills" beautifier.
PL/SQL Developer
Version 7.1.1.1339
39044 - 10 user license
Windows XP Professional 5.1 Build 2600 (Service Pack 2)
Physical memory : 2,096,360 kB (1,148,896 available)
Paging file : 3,991,280 kB (3,112,688 available)
Virtual memory : 2,097,024 kB (1,995,980 available)
Parameters
C:\Program Files\PLSQL Developer 7.1\PlSqlDev.exe
/nosplash
Preferences
Session mode: Dual
OCI Library:
Use OCI7: False
Preference Files
C:\Program Files\PLSQL Developer 7.1\Preferences\Default\Default.ini
C:\Program Files\PLSQL Developer 7.1\Preferences\JiriO\default.ini
Plug-Ins
Aliases
BXLDW
CDW
CDWH
EM
EXTPROC_CONNECTION_DATA
...
Homes
BITools (C:\oracle\BITools)
OraDb10g2 (C:\oracle\10g2)
OraDesig (D:\Oracle\Designer)
DLLs
C:\oracle\10g2\bin\oci.dll
TNS File
c:\oracle\tnsnames.ora
Using
Home: OraDb10g2
DLL: C:\oracle\10g2\bin\oci.dll
OCI: version 9.2
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
Character Sets
Character size: 4 byte(s)
CharSetID: 873
NCharSetID: 2000
Unicode Support: True
NLS_LANG: AMERICAN_AMERICA.AL32UTF8
NLS_CHARACTERSET: AL32UTF8
NLS_NCHAR_CHARACTERSET: AL16UTF16
best regards
Jiri
this query below "kills" beautifier.
Code:
select country_code, From_Date, To_Date, Info
from (select country_code,
sales_date as From_Date,
case
when Next_Diff = 1 then
Lead(sales_date) Over(partition by country_code order by sales_date)
else
sales_date
end as To_Date,
case
when Prev_Diff = 1 then -- has already been counted in previous interval
'ignore'
else
'use' -- probably is a single day
end as Info
from ( -- just get ordered info about dates per market
select country_code,
sales_date - Lag(sales_date, 1) Over(partition by country_code order by sales_date) Prev_Diff,
sales_date,
Lead(sales_date, 1) Over(partition by country_code order by sales_date) - sales_date Next_Diff
from (select distinct country_code, sales_date -- get the different dates
from (select country_code, sales_date, tot_fifo,qty_fifo_Sum
from (select *
from ((select country_code, sales_date, tot_fifo,qty_fifo_Sum
from sys_fifo_control_sums
where System_Id = 'ORI') minus
(select country_code, sales_date, tot_fifo,qty_fifo_Sum
from sys_fifo_control_sums
where System_Id = 'DWH'))
union all
select *
from ((select country_code, sales_date, tot_fifo,qty_fifo_Sum
from sys_fifo_control_sums
where System_Id = 'DWH') minus
(select country_code, sales_date, tot_fifo,qty_fifo_Sum
from sys_fifo_control_sums
where System_Id = 'ORI'))))
)
)
where not (Nvl(Next_Diff, 2) = 1 and Nvl(Prev_Diff, 2) = 1))
Version 7.1.1.1339
39044 - 10 user license
Windows XP Professional 5.1 Build 2600 (Service Pack 2)
Physical memory : 2,096,360 kB (1,148,896 available)
Paging file : 3,991,280 kB (3,112,688 available)
Virtual memory : 2,097,024 kB (1,995,980 available)
Parameters
C:\Program Files\PLSQL Developer 7.1\PlSqlDev.exe
/nosplash
Preferences
Session mode: Dual
OCI Library:
Use OCI7: False
Preference Files
C:\Program Files\PLSQL Developer 7.1\Preferences\Default\Default.ini
C:\Program Files\PLSQL Developer 7.1\Preferences\JiriO\default.ini
Plug-Ins
Aliases
BXLDW
CDW
CDWH
EM
EXTPROC_CONNECTION_DATA
...
Homes
BITools (C:\oracle\BITools)
OraDb10g2 (C:\oracle\10g2)
OraDesig (D:\Oracle\Designer)
DLLs
C:\oracle\10g2\bin\oci.dll
TNS File
c:\oracle\tnsnames.ora
Using
Home: OraDb10g2
DLL: C:\oracle\10g2\bin\oci.dll
OCI: version 9.2
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
Character Sets
Character size: 4 byte(s)
CharSetID: 873
NCharSetID: 2000
Unicode Support: True
NLS_LANG: AMERICAN_AMERICA.AL32UTF8
NLS_CHARACTERSET: AL32UTF8
NLS_NCHAR_CHARACTERSET: AL16UTF16
best regards
Jiri