Error while creating Attribute View
When I try to get Attribute view through two joined table with same type join indices I get following error ;
Could not execute 'CREATE COLUMN VIEW "_SYS_BIC"."MyDB/TEAM_EVENT" TYPE JOIN WITH PARAMETERS ( joinIndex = ...' in 112 ms 159 µs . SAP DBTech JDBC: [2048]: column store error: logical index creation error: [2434] join index inconsistent;object=MyDB/TEAM_EVENTen
I tried everyhing in mind but cannot solve the problem. Any idea ?
Try
CREATE OR REPLACE VIEW rdr_le_info_view
AS
SELECT l.strategic_le
,cun.ucn cunucn
,cun.date
,cccs.ucn ucn
,cccs.agr_num
FROM strat_le l
,ucn_name cun
,customer_setup cccs
,cccs.run_num run_num
WHERE l.gfa_until_dt = '31-dec-9999'
AND l.glas_until_dt = '31-dec-9999'
AND l.int_until_dt = '31-dec-9999'
AND cccs.ucn_lead_office = cun.ucn
AND cun.OID = l.client_oid;Then call it like:
select *
from rdr_le_info_view
where run_num = v_run_num;
Similar Messages
-
Error while creating parameterise view
I m getting below error while creating parameterise view
CREATE OR REPLACE VIEW rdr_le_info_view (v_run_number , v_isin_cob )
AS
SELECT l.strategic_le
,cun.ucn cunucn
,cun.date
,cccs.ucn ucn
,cccs.agr_num
FROM strat_le l
,ucn_name cun
,customer_setup cccs
WHERE l.gfa_until_dt = '31-dec-9999'
AND l.glas_until_dt = '31-dec-9999'
AND l.int_until_dt = '31-dec-9999'
AND cccs.run_num = v_run_num
AND cccs.ucn_lead_office = cun.ucn
AND cun.OID = l.client_oid;
AND cccs.run_num = v_run_num
ERROR at line 13:
ORA-00904: "V_RUN_NUM": invalid identifier
Plese help me in above.Try
CREATE OR REPLACE VIEW rdr_le_info_view
AS
SELECT l.strategic_le
,cun.ucn cunucn
,cun.date
,cccs.ucn ucn
,cccs.agr_num
FROM strat_le l
,ucn_name cun
,customer_setup cccs
,cccs.run_num run_num
WHERE l.gfa_until_dt = '31-dec-9999'
AND l.glas_until_dt = '31-dec-9999'
AND l.int_until_dt = '31-dec-9999'
AND cccs.ucn_lead_office = cun.ucn
AND cun.OID = l.client_oid;Then call it like:
select *
from rdr_le_info_view
where run_num = v_run_num; -
Error while creating Attribute In BPM Object
Hi,
I am getting error while creating attributes in BPM Object.I am not able to open BPm object. while opening I am getting Below error.
Please suggest.
java.lang.StringIndexOutOfBoundsException: String index out of range: 28
at java.lang.String.charAt(Unknown Source)
at fuego.type.TypeFactory.createFromName(TypeFactory.java:482)
at fuego.type.TypeFactory.forNameLazy(TypeFactory.java:263)
at fuego.lang.CollectionTypeDescription.getIndexTypeRef(CollectionTypeDescription.java:146)
at fuego.compiler.type.TypeRenderer.renderArrayType(TypeRenderer.java:355)
at fuego.compiler.type.TypeRenderer.renderType(TypeRenderer.java:261)
at fuego.compiler.type.TypeRenderer.renderArrayType(TypeRenderer.java:344)
at fuego.compiler.type.TypeRenderer.renderType(TypeRenderer.java:261)
at fuego.compiler.type.TypeRenderer.render(TypeRenderer.java:106)
at fuego.compiler.type.TypeRenderer.render(TypeRenderer.java:94)
at fuego.compiler.type.TypeRenderer.render(TypeRenderer.java:78)
at fuego.designer.XObjectComponentStructurePanel$CellTypeRenderer.getText(XObjectComponentStructurePanel.java:612)
at fuego.designer.XObjectComponentStructurePanel$CellTypeRenderer.getText(XObjectComponentStructurePanel.java:605)
at fuego.ui.peer.swt.SwtTable$SwtTableModel.getColumnText(SwtTable.java:956)
at org.eclipse.jface.viewers.TableColumnViewerLabelProvider.update(TableColumnViewerLabelProvider.java:70)
at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:135)
at org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(AbstractTableViewer.java:386)
at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:466)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:199)
at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2026)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:695)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:633)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:620)
at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1433)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1368)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1330)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1431)
at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:536)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1390)
at fuego.ui.peer.swt.SwtViewer.repaint(SwtViewer.java:59)
at fuego.ui.peer.swt.SwtColumn.setLabelProvider(SwtColumn.java:89)
at fuego.ui.Column.setLabelProvider(Column.java:82)
at fuego.designer.XObjectComponentStructurePanel.buildUI(XObjectComponentStructurePanel.java:299)
at fuego.designer.AbstractEditor.build(AbstractEditor.java:542)
at fuego.designer.AbstractEditor.init(AbstractEditor.java:133)
at fuego.designer.XObjectComponentStructurePanel.<init>(XObjectComponentStructurePanel.java:126)
at fuego.eclipse.studio.multipageeditor.BPMObjectMultipartEditor.createStructurePage(BPMObjectMultipartEditor.java:581)
at fuego.eclipse.studio.multipageeditor.BPMObjectMultipartEditor.addDefaultPages(BPMObjectMultipartEditor.java:464)
at fuego.eclipse.studio.multipageeditor.ExtendedMultiPageEditorPart.createPages(ExtendedMultiPageEditorPart.java:399)
at fuego.eclipse.studio.multipageeditor.eclipse.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:253)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:426)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:299)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:179)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:400)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1604)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:217)
at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:207)
at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:774)
at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:673)
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:634)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2737)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2651)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:2643)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2595)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2590)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2574)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2557)
at fuego.eclipse.ui.DefaultEditor.open(DefaultEditor.java:65)
at fuego.eclipse.studio.EclipseWorkbench.createEditorFromResource(EclipseWorkbench.java:529)
at fuego.eclipse.studio.EclipseWorkbench.createEditor(EclipseWorkbench.java:297)
at fuego.designer.action.OpenCatalogNodeAction.open(OpenCatalogNodeAction.java:91)
at fuego.designer.action.OpenCatalogNodeAction.run(OpenCatalogNodeAction.java:55)
at fuego.eclipse.ui.EclipseAction.run(EclipseAction.java:180)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)When you say you're having trouble "opening" the BPM Object, is it possible you instead mean you're having trouble expanding the BPM Object?
Just a guess, but if you're having trouble expanding the BPM Object I'd suspect that the object's xcdl contents might be corrupted. You might want to consider exporting and saving a backup of the project and then try deleting the object from the Project Navigator. Rebuild the BPM Object once you've deleted it.
Dan -
Hi All,
I am getting the below errors while creating view.
ORA-03135:connection lost contact
ORA-03134:not connected to ORACLE
Please suggest. Thanks
AJRcheck this link... even this can also be a reason
Ravi Kumar -
Error While Creating Materialized View
Hello,
I am getting error ORA-22818: subquery expressions not allowed here while creating materialized view. I am using Oracle9i Enterprise Edition Release 9.2.0.1.0. Below pasted is my SQL Script.
Any help is highly appreciable.
Thanks
*********SQL************
select distinct(id),NAME,(select count(GRADE) from employees where
nationality like '%US%'and id=a.organization_id and grade=a.grade
group by ID,GRADE) US,(select count(GRADE) from employees where
nationality not like '%US%' and organization_id=a.organization_id and grade=a.grade
group by ORGANIZATION_ID,GRADE) NON_US,grade from employees a
where grade is not null
group by GRADE,ID,name
order by to_number(grade) descHi,
This is a documented restriction on MVs. You cannot have a scalar express (i.e a select statement) in the select list.
You can get round this by joining your select count(grade).. expression in as an inline view in your FROM clause. Or you can create a normal view without the scalar expression, create your MV as a select from this view, then re-define your view to contain the query you want.
Hope that helps,
Rod West -
Error while creating Materialized View step 3 of 6 using wizard
have oracle 9i Rel 1 on Windows 2000 server. Master Site has been setup. Database links are created at Materialized view site. But while creating Materialized View Group using wizard there is following error on step 3 of 6.
Statement:----------------
/*OracleOEM*/ SELECT 1 FROM SYS.dba_constraints@masterdbname WHERE OWNER='username' and table_name='tabname' AND constraint_type='P'
Stack Trace:----------------
ORA-00942: table or view does not exist.
ORA-02063: preceding line from masterdbname.
All parameters for replication are correct.
Please help me early.
ThanksHello,
In the masterdbname, logging as sys user, you must grant select permission on sys.dba_constraints view to mvadmin_dbname user (where dbname is the replicated database name).
Regards, -
Error while creating Materialized View step 3 of 6
I have oracle 9i Rel 1 on Windows 2000 server. Master Site has been setup. Database links are created at Materialized view site. But while creating Materialized View Group there is following error on step 3 of 6.
Statement:----------------
/*OracleOEM*/ SELECT 1 FROM SYS.dba_constraints@masterdbname WHERE OWNER='username' and table_name='tabname' AND constraint_type='P'
Stack Trace:----------------
ORA-00942: table or view does not exist.
ORA-02063: preceding line from masterdbname.
All parameters for replication are correct.
Please help me early.
ThanksHello,
In the masterdbname, logging as sys user, you must grant select permission on sys.dba_constraints view to mvadmin_dbname user (where dbname is the replicated database name).
Regards, -
Error: while creating a view - Help needed
When i am trying to create the view i am getting the error msg as:
==>ORA-02070: database does not support operator NLS_CHARSET_DECL_LEN in this context<==
Please advise in this regard to overcome this issue.
the view is nothing but
================
create or replace view f_test as
WITH metadata1 as
(SELECT DISTINCT * FROM
(SELECT fre_id, bu_id, eff_from_dt, rec_eff_from_dt,
rec_eff_to_dt, rec_type, eff_to_dt,
active_flg, nm_long, nm_short,
rplcmnt_bu_id, pc_cc_cd, tax_cd, bu_type_cd,
ledger_cd, internal_id, create_dt,
last_upd_dt, last_upd_id,
DENSE_RANK () OVER (PARTITION BY fre_id, bu_id, eff_from_dt
ORDER BY fre_id, bu_id, eff_from_dt, rec_eff_from_dt) RANK
FROM AUD_TEST)
aud1 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD'
AND rank = '1') ,
aud2 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '2'),
aud3 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '3'),
aud4 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '4'),
aud5 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '5'),
aud6 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '6'),
aud7 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '7'),
aud8 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '8'),
aud9 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '9'),
aud10 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '10'),
metadata2 as
(select aud1.column_name,
aud1.col_val_new,
'' col_val_old,
aud1.fre_id,
aud1.bu_id,
aud1.eff_from_dt,
aud1.rec_eff_from_dt,
aud1.rec_type,
aud1.rank
from aud1
union all
select aud2.column_name, DECODE(aud2.rec_type,'D','',aud2.col_val_new) col_val_new, aud1.col_val_new col_val_old, aud2.fre_id, aud2.bu_id,
aud2.eff_from_dt, aud2.rec_eff_from_dt, aud2.rec_type, aud2.rank
from aud1, aud2
where (aud1.fre_id = aud2.fre_id and aud1.bu_id = aud2.bu_id and aud1.eff_from_dt = aud2.eff_from_dt
and aud1.column_name = aud2.column_name
and ( (aud2.rec_type = 'C' and nvl(aud1.col_val_new,'^') <> nvl(aud2.col_val_new,'~') ) or
(aud2.rec_type <> 'C' or (nvl(aud1.col_val_new,'^') <> nvl(aud2.col_val_new,'~'))))
union all
select aud3.column_name, DECODE(aud3.rec_type,'D','',aud3.col_val_new) col_val_new, aud2.col_val_new col_val_old, aud3.fre_id, aud3.bu_id,
aud3.eff_from_dt, aud3.rec_eff_from_dt, aud3.rec_type, aud3.rank
from aud2, aud3
where (aud2.fre_id = aud3.fre_id and aud2.bu_id = aud3.bu_id and aud2.eff_from_dt = aud3.eff_from_dt
and aud2.column_name = aud3.column_name
and ( (aud3.rec_type = 'C' and nvl(aud2.col_val_new,'^') <> nvl(aud3.col_val_new,'~') ) or
(aud3.rec_type <> 'C' or (nvl(aud2.col_val_new,'^') <> nvl(aud3.col_val_new,'~'))))
union all
select aud4.column_name, DECODE(aud4.rec_type,'D','',aud4.col_val_new) col_val_new, aud3.col_val_new col_val_old, aud4.fre_id, aud4.bu_id,
aud4.eff_from_dt, aud4.rec_eff_from_dt, aud4.rec_type, aud4.rank
from aud3, aud4
where (aud3.fre_id = aud4.fre_id and aud3.bu_id = aud4.bu_id and aud3.eff_from_dt = aud4.eff_from_dt
and aud3.column_name = aud4.column_name
and ( (aud4.rec_type = 'C' and nvl(aud3.col_val_new,'^') <> nvl(aud4.col_val_new,'~') ) or
(aud4.rec_type <> 'C' or (nvl(aud3.col_val_new,'^') <> nvl(aud4.col_val_new,'~'))))
union all
select aud5.column_name, DECODE(aud5.rec_type,'D','',aud5.col_val_new) col_val_new, aud4.col_val_new col_val_old, aud5.fre_id, aud5.bu_id,
aud5.eff_from_dt, aud5.rec_eff_from_dt, aud5.rec_type, aud5.rank
from aud4, aud5
where (aud4.fre_id = aud5.fre_id and aud4.bu_id = aud5.bu_id and aud4.eff_from_dt = aud5.eff_from_dt
and aud4.column_name = aud5.column_name
and ( (aud5.rec_type = 'C' and nvl(aud4.col_val_new,'^') <> nvl(aud5.col_val_new,'~') ) or
(aud5.rec_type <> 'C' or (nvl(aud4.col_val_new,'^') <> nvl(aud5.col_val_new,'~'))))
union all
select aud6.column_name, DECODE(aud6.rec_type,'D','',aud6.col_val_new) col_val_new, aud5.col_val_new col_val_old, aud6.fre_id, aud6.bu_id,
aud6.eff_from_dt, aud6.rec_eff_from_dt, aud6.rec_type, aud6.rank
from aud5, aud6
where (aud5.fre_id = aud6.fre_id and aud5.bu_id = aud6.bu_id and aud5.eff_from_dt = aud6.eff_from_dt
and aud5.column_name = aud6.column_name
and ( (aud6.rec_type = 'C' and nvl(aud5.col_val_new,'^') <> nvl(aud6.col_val_new,'~') ) or
(aud6.rec_type <> 'C' or (nvl(aud5.col_val_new,'^') <> nvl(aud6.col_val_new,'~'))))
union all
select aud7.column_name, DECODE(aud7.rec_type,'D','',aud7.col_val_new) col_val_new, aud6.col_val_new col_val_old, aud7.fre_id, aud7.bu_id,
aud7.eff_from_dt, aud7.rec_eff_from_dt, aud7.rec_type, aud7.rank
from aud6, aud7
where (aud6.fre_id = aud7.fre_id and aud6.bu_id = aud7.bu_id and aud6.eff_from_dt = aud7.eff_from_dt
and aud6.column_name = aud7.column_name
and ( (aud7.rec_type = 'C' and nvl(aud6.col_val_new,'^') <> nvl(aud7.col_val_new,'~') ) or
(aud7.rec_type <> 'C' or (nvl(aud6.col_val_new,'^') <> nvl(aud7.col_val_new,'~'))))
union all
select aud8.column_name, DECODE(aud8.rec_type,'D','',aud8.col_val_new) col_val_new, aud7.col_val_new col_val_old, aud8.fre_id, aud8.bu_id,
aud8.eff_from_dt, aud8.rec_eff_from_dt, aud8.rec_type, aud8.rank
from aud7, aud8
where (aud7.fre_id = aud8.fre_id and aud7.bu_id = aud8.bu_id and aud7.eff_from_dt = aud8.eff_from_dt
and aud7.column_name = aud8.column_name
and ( (aud8.rec_type = 'C' and nvl(aud7.col_val_new,'^') <> nvl(aud8.col_val_new,'~') ) or
(aud8.rec_type <>'C' or (nvl(aud7.col_val_new,'^') <> nvl(aud8.col_val_new,'~'))))
union all
select aud9.column_name, DECODE(aud9.rec_type,'D','',aud9.col_val_new) col_val_new, aud8.col_val_new col_val_old, aud9.fre_id, aud9.bu_id,
aud9.eff_from_dt, aud9.rec_eff_from_dt, aud9.rec_type, aud9.rank
from aud8, aud9
where (aud8.fre_id = aud9.fre_id and aud8.bu_id = aud9.bu_id and aud8.eff_from_dt = aud9.eff_from_dt
and aud8.column_name = aud9.column_name
and ( (aud9.rec_type = 'C' and nvl(aud8.col_val_new,'^') <> nvl(aud9.col_val_new,'~') ) or
(aud9.rec_type <> 'C' or (nvl(aud8.col_val_new,'^') <> nvl(aud9.col_val_new,'~'))))
union all
select aud10.column_name, DECODE(aud10.rec_type,'D','',aud10.col_val_new) col_val_new, aud9.col_val_new col_val_old, aud10.fre_id, aud10.bu_id,
aud10.eff_from_dt, aud10.rec_eff_from_dt, aud10.rec_type, aud10.rank
from aud9, aud10
where (aud9.fre_id = aud10.fre_id and aud9.bu_id = aud10.bu_id and aud9.eff_from_dt = aud10.eff_from_dt
and aud9.column_name = aud10.column_name
and ((aud10.rec_type = 'C' and nvl(aud9.col_val_new,'^') <> nvl(aud10.col_val_new,'~') )
or (aud10.rec_type <> 'C' or (nvl(aud9.col_val_new,'^') <> nvl(aud10.col_val_new,'~'))))
select * from metadata2
where (rec_type = 'C' and (col_val_new is not null or col_val_old is not null))
or (rec_type <> 'C');create or replace view frd_bu_test as
WITH metadata1 as
(SELECT DISTINCT * FROM
(SELECT fre_id, bu_id, eff_from_dt, rec_eff_from_dt,
rec_eff_to_dt, rec_type, eff_to_dt,
active_flg, nm_long, nm_short,
rplcmnt_bu_id, pc_cc_cd, tax_cd, bu_type_cd,
ledger_cd, internal_id, create_dt,
last_upd_dt, last_upd_id,
DENSE_RANK () OVER (PARTITION BY fre_id, bu_id, eff_from_dt
ORDER BY fre_id, bu_id, eff_from_dt, rec_eff_from_dt) RANK
FROM AUD_TEST)
aud1 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD'
AND rank = '1') ,
aud2 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '2'),
aud3 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '3'),
aud4 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '4'),
aud5 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '5'),
aud6 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '6'),
aud7 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '7'),
aud8 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '8'),
aud9 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '9'),
aud10 AS
(SELECT column_name,
DECODE (column_id,
7, TO_CHAR (eff_to_dt, 'MMDDRRRR'),
8, active_flg,
9, nm_long,
10, nm_short,
11, rplcmnt_bu_id,
12, pc_cc_cd,
13, tax_cd,
14, bu_type_cd,
15, ledger_cd) col_val_new,
'' col_val_old, fre_id, bu_id, eff_from_dt, rec_eff_from_dt, rec_type, rank
FROM metadata1 m, all_tab_columns u
WHERE table_name = 'AUD_TEST'
AND column_name IN
('EFF_TO_DT',
'ACTIVE_FLG',
'NM_LONG',
'NM_SHORT',
'RPLCMNT_BU_ID',
'PC_CC_CD',
'TAX_CD',
'BU_TYPE_CD',
'LEDGER_CD')
AND rank = '10'),
metadata2 as
(select aud1.column_name,
aud1.col_val_new,
'' col_val_old,
aud1.fre_id,
aud1.bu_id,
aud1.eff_from_dt,
aud1.rec_eff_from_dt,
aud1.rec_type,
aud1.rank
from aud1
union all
select aud2.column_name, DECODE(aud2.rec_type,'D','',aud2.col_val_new) col_val_new, aud1.col_val_new col_val_old, aud2.fre_id, aud2.bu_id,
aud2.eff_from_dt, aud2.rec_eff_from_dt, aud2.rec_type, aud2.rank
from aud1, aud2
where (aud1.fre_id = aud2.fre_id and aud1.bu_id = aud2.bu_id and aud1.eff_from_dt = aud2.eff_from_dt
and aud1.column_name = aud2.column_name
and ( (aud2.rec_type = 'C' and nvl(aud1.col_val_new,'^') <> nvl(aud2.col_val_new,'~') ) or
(aud2.rec_type <> 'C' or (nvl(aud1.col_val_new,'^') <> nvl(aud2.col_val_new,'~'))))
union all
select aud3.column_name, DECODE(aud3.rec_type,'D','',aud3.col_val_new) col_val_new, aud2.col_val_new col_val_old, aud3.fre_id, aud3.bu_id,
aud3.eff_from_dt, aud3.rec_eff_from_dt, aud3.rec_type, aud3.rank
from aud2, aud3
where (aud2.fre_id = aud3.fre_id and aud2.bu_id = aud3.bu_id and aud2.eff_from_dt = aud3.eff_from_dt
and aud2.column_name = aud3.column_name
and ( (aud3.rec_type = 'C' and nvl(aud2.col_val_new,'^') <> nvl(aud3.col_val_new,'~') ) or
(aud3.rec_type <> 'C' or (nvl(aud2.col_val_new,'^') <> nvl(aud3.col_val_new,'~'))))
union all
select aud4.column_name, DECODE(aud4.rec_type,'D','',aud4.col_val_new) col_val_new, aud3.col_val_new col_val_old, aud4.fre_id, aud4.bu_id,
aud4.eff_from_dt, aud4.rec_eff_from_dt, aud4.rec_type, aud4.rank
from aud3, aud4
where (aud3.fre_id = aud4.fre_id and aud3.bu_id = aud4.bu_id and aud3.eff_from_dt = aud4.eff_from_dt
and aud3.column_name = aud4.column_name
and ( (aud4.rec_type = 'C' and nvl(aud3.col_val_new,'^') <> nvl(aud4.col_val_new,'~') ) or
(aud4.rec_type <> 'C' or (nvl(aud3.col_val_new,'^') <> nvl(aud4.col_val_new,'~'))))
union all
select aud5.column_name, DECODE(aud5.rec_type,'D','',aud5.col_val_new) col_val_new, aud4.col_val_new col_val_old, aud5.fre_id, aud5.bu_id,
aud5.eff_from_dt, aud5.rec_eff_from_dt, aud5.rec_type, aud5.rank
from aud4, aud5
where (aud4.fre_id = aud5.fre_id and aud4.bu_id = aud5.bu_id and aud4.eff_from_dt = aud5.eff_from_dt
and aud4.column_name = aud5.column_name
and ( (aud5.rec_type = 'C' and nvl(aud4.col_val_new,'^') <> nvl(aud5.col_val_new,'~') ) or
(aud5.rec_type <> 'C' or (nvl(aud4.col_val_new,'^') <> nvl(aud5.col_val_new,'~'))))
union all
select aud6.column_name, DECODE(aud6.rec_type,'D','',aud6.col_val_new) col_val_new, aud5.col_val_new col_val_old, aud6.fre_id, aud6.bu_id,
aud6.eff_from_dt, aud6.rec_eff_from_dt, aud6.rec_type, aud6.rank
from aud5, aud6
where (aud5.fre_id = aud6.fre_id and aud5.bu_id = aud6.bu_id and aud5.eff_from_dt = aud6.eff_from_dt
and aud5.column_name = aud6.column_name
and ( (aud6.rec_type = 'C' and nvl(aud5.col_val_new,'^') <> nvl(aud6.col_val_new,'~') ) or
(aud6.rec_type <> 'C' or (nvl(aud5.col_val_new,'^') <> nvl(aud6.col_val_new,'~'))))
union all
select aud7.column_name, DECODE(aud7.rec_type,'D','',aud7.col_val_new) col_val_new, aud6.col_val_new col_val_old, aud7.fre_id, aud7.bu_id,
aud7.eff_from_dt, aud7.rec_eff_from_dt, aud7.rec_type, aud7.rank
from aud6, aud7
where (aud6.fre_id = aud7.fre_id and aud6.bu_id = aud7.bu_id and aud6.eff_from_dt = aud7.eff_from_dt
and aud6.column_name = aud7.column_name
and ( (aud7.rec_type = 'C' and nvl(aud6.col_val_new,'^') <> nvl(aud7.col_val_new,'~') ) or
(aud7.rec_type <> 'C' or (nvl(aud6.col_val_new,'^') <> nvl(aud7.col_val_new,'~'))))
union all
select aud8.column_name, DECODE(aud8.rec_type,'D','',aud8.col_val_new) col_val_new, aud7.col_val_new col_val_old, aud8.fre_id, aud8.bu_id,
aud8.eff_from_dt, aud8.rec_eff_from_dt, aud8.rec_type, aud8.rank
from aud7, aud8
where (aud7.fre_id = aud8.fre_id and aud7.bu_id = aud8.bu_id and aud7.eff_from_dt = aud8.eff_from_dt
and aud7.column_name = aud8.column_name
and ( (aud8.rec_type = 'C' and nvl(aud7.col_val_new,'^') <> nvl(aud8.col_val_new,'~') ) or
(aud8.rec_type <>'C' or (nvl(aud7.col_val_new,'^') <> nvl(aud8.col_val_new,'~'))))
union all
select aud9.column_name, DECODE(aud9.rec_type,'D','',aud9.col_val_new) col_val_new, aud8.col_val_new col_val_old, aud9.fre_id, aud9.bu_id,
aud9.eff_from_dt, aud9.rec_eff_from_dt, aud9.rec_type, aud9.rank
from aud8, aud9
where (aud8.fre_id = aud9.fre_id and aud8.bu_id = aud9.bu_id and aud8.eff_from_dt = aud9.eff_from_dt
and aud8.column_name = aud9.column_name
and ( (aud9.rec_type = 'C' and nvl(aud8.col_val_new,'^') <> nvl(aud9.col_val_new,'~') ) or
(aud9.rec_type <> 'C' or (nvl(aud8.col_val_new,'^') <> nvl(aud9.col_val_new,'~'))))
union all
select aud10.column_name, DECODE(aud10.rec_type,'D','',aud10.col_val_new) col_val_new, aud9.col_val_new col_val_old, aud10.fre_id, aud10.bu_id,
aud10.eff_from_dt, aud10.rec_eff_from_dt, aud10.rec_type, aud10.rank
from aud9, aud10
where (aud9.fre_id = aud10.fre_id and aud9.bu_id = aud10.bu_id and aud9.eff_from_dt = aud10.eff_from_dt
and aud9.column_name = aud10.column_name
and ((aud10.rec_type = 'C' and nvl(aud9.col_val_new,'^') <> nvl(aud10.col_val_new,'~') )
or (aud10.rec_type <> 'C' or (nvl(aud9.col_val_new,'^') <> nvl(aud10.col_val_new,'~'))))
select * from metadata2
where (rec_type = 'C' and (col_val_new is not null or col_val_old is not null))
or (rec_type <> 'C'); -
Error while creating a View Cluster
Hello Gurus,
I have created two maintenance views ZVIEW1 & ZVIEW2 with table maintenance generator.Know I am trying
to create a view cluster using these views.
I have Proceeded with the following steps to create the View Cluster:
1. Tcode : SE54 --> GIven the name ZVIEWCLUSTER as View Cluster name & pressed ENTER.
2. Filled the description of the View cluster.
3.Selected the tab OBJECT STRUCTURE and filled it with ZVIEW1 & ZVIEW2.
4.Selected view ZVIEW1 and clicked on button "FIELD-DEPENDENCE" ,System throws a message
"Field-dependence generated succesfully"
5. Selected view ZVIEW2 and clicked on button "FIELD-DEPENDENCE" ,System throws an error message
"No log generated".
Am stuck up at point 5 in the above mentioned steps.
Please guide me in coming out of this error message.
Regards,
NajamHi Najam,
I don't think you need to define field dependencies for both tables, you only define the relationship from the second table to the first.
Double-click on the Field dependencies folder and check the link between the two tables is correctly defined, if so you don't need to generate the field dependency twice.
Regards,
Nick -
Error while creating materialized view which using database link
Helo!
I'm getting error "ORA-00942: table or view does not exist" when I want to create materialized view.
Details:
1. On destination database I create a database link:
CREATE DATABASE LINK SDATABASE
CONNECT TO MYUSER
IDENTIFIED BY MYUSERPASS
USING 'ORCL';
=> Command "SELECT * FROM TABLE1@SDATABASE" returns data normally!
2. On source database I create MATERIALIZED VIEW LOG:
CREATE MATERIALIZED VIEW LOG
ON TABLE1
WITH PRIMARY KEY
INCLUDING NEW VALUES;
3. Now, when I want to create MATERIALIZED VIEW on destination database:
CREATE MATERIALIZED VIEW TABLE1
REFRESH FAST
START WITH SYSDATE
NEXT SYSDATE + 1/1440
WITH PRIMARY KEY
AS SELECT * FROM TABLE1@SDATABASE;
...I get error "ORA-00942: table or view does not exist"!
How is that possible if command "SELECT * FROM TABLE1@SDATABASE" returns data normally?
Thanks,
VorancAnd, I'm using Oracle 10g.
Voranc -
Error while creating a view and creating navigation link
Hi,
i created one view with one button and on click of button it has to navigate to DeleteOperationview.This is the exception i am getting while running.
can u plz tell me where the problem might beee...
com.sap.tc.webdynpro.services.exceptions.CreationFailedException: Cannot create view element implementation com.sap.tc.webdynpro.clientserver.uielib.standard.impl.Caption
* at com.sap.tc.webdynpro.progmodel.view.ViewElementFactory.createElement(ViewElementFactory.java:161)*
* at com.sap.tc.webdynpro.progmodel.view.View.createElement(View.java:177)*
* at com.utc.pwc.tasklistm.wdp.InternalDeleteOperation.wdCreateUITreeForGroup(InternalDeleteOperation.java:282)*
* at com.utc.pwc.tasklistm.wdp.InternalDeleteOperation.wdCreateUITree(InternalDeleteOperation.java:259)*
* at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.createUITree(DelegatingView.java:74)*
* at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:443)*
* at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)*
* at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)*
* at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555*
Regards
Padma NHi Padma,
In Outline check the <b>id </b> property of the <b> Caption-Header </b> view elements from the properties window it seems some of the ids are duplicate it should be unique.
Other wise delete the container elements and design the view layout once again.
Re: dynpro table -dynamically change table header name
Regards,
Mithu -
Error while creating a VIEW.Please GUIDE.
Hi,
I am getting the error
FROM sdi S where S.sdi_num=35128
Error: missing expression
when I Try to create a VIEW AS defined below:
Am I missing out anything please?
Create or Replace VIEW sdiview
AS
SELECT sdi_num,
vers_num,
cursor(SELECT acnt
FROM sdi_account A WHERE
A.sdi_num = S.sdi_num) Account,
FROM sdi S where S.sdi_num = 35128;Not sure the CURSOR expression works with Oracle 9.0.2 or not.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> create or replace view emp_dept_vw
2 as (select deptno, deptname, cursor(select empno from emp a
3 where a.deptno = d.deptno) empno from dept d
4 where d.deptno = 10);
as (select deptno, deptname, cursor(select empno from emp a
ERROR at line 2:
ORA-22902: CURSOR expression not allowedWhat about 10g?
Thanks
BB -
Error while creating Power View Report via BISM connection.
I am able to create a PowerView Report using Microsoft BI Semantic Model connection without any problem. Everything works from home. But when I try to create Power View report using a BISM connection, I am running into errors. I've verified all permissions
are all set correctly and SQL Browser service is running as well. Please see below error message. Greatly appreciate any pointers.
Detailed error message
Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'TemporaryDataSource'. ---> Microsoft.AnalysisServices.AdomdClient.AdomdConnectionException:
A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running. ---> System.Net.Sockets.SocketException: The requested name is valid, but no data of the requested type was found at System.Net.Sockets.TcpClient..ctor(String
hostname, Int32 port) at Microsoft.AnalysisServices.AdomdClient.XmlaClient.GetTcpClient(ConnectionInfo connectionInfo) --- End of inner exception stack trace --- at Microsoft.AnalysisServices.AdomdClient.XmlaClient.GetTcpClient(ConnectionInfo
connectionInfo) at Microsoft.AnalysisServices.AdomdClient.XmlaClient.OpenTcpConnection(ConnectionInfo connectionInfo) at Microsoft.AnalysisServices.AdomdClient.XmlaClient.OpenConnection(ConnectionInfo connectionInfo, Boolean&
isSessionTokenNeeded) at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession) at Microsoft.AnalysisServices.AdomdClient.XmlaClient.GetInstancePort(ConnectionInfo connectionInfo)
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.GetTcpClient(ConnectionInfo connectionInfo) at Microsoft.AnalysisServices.AdomdClient.XmlaClient.OpenTcpConnection(ConnectionInfo connectionInfo) at Microsoft.AnalysisServices.AdomdClient.XmlaClient.OpenConnection(ConnectionInfo
connectionInfo, Boolean& isSessionTokenNeeded) at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession) at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Connect(Boolean
toIXMLA) at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP) at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open() at Microsoft.ReportingServices.DataExtensions.AdoMdConnectionBase.InternalOpen()
at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.OpenConnection(IProcessingDataSource dataSourceObj, DataSourceInfo dataSourceInfo, IDbConnection conn) --- End of inner exception stack trace ---;So , have you actually came to a conclusion about the problem. I have a similar one in my environment.
<detail><ErrorCode xmlns="http://www.microsoft.com/sql/reportingservices">rsCannotRetrieveModel</ErrorCode><HttpStatus
xmlns="http://www.microsoft.com/sql/reportingservices">400</HttpStatus><Message xmlns="http://www.microsoft.com/sql/reportingservices">Erro
ao carregar o modelo para o item ou a fonte de dados 'http://gasmignethml/BICenter/Galeria%20PowerPivot/BIGASMIG.bism'. Verifique se as informações de conexão estão corretas e se você tem permissões para acessar a fonte de dados.</Message><HelpLink
xmlns="http://www.microsoft.com/sql/reportingservices">http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsCannotRetrieveModel&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=11.0.5058.0</HelpLink><ProductName
xmlns="http://www.microsoft.com/sql/reportingservices">Microsoft SQL Server Reporting Services</ProductName><ProductVersion xmlns="http://www.microsoft.com/sql/reportingservices">11.0.5058.0</ProductVersion><ProductLocaleId
xmlns="http://www.microsoft.com/sql/reportingservices">127</ProductLocaleId><OperatingSystem xmlns="http://www.microsoft.com/sql/reportingservices">OsIndependent</OperatingSystem><CountryLocaleId
xmlns="http://www.microsoft.com/sql/reportingservices">1033</CountryLocaleId><MoreInformation xmlns="http://www.microsoft.com/sql/reportingservices"><Source>ReportingServicesLibrary</Source><Message
msrs:ErrorCode="rsCannotRetrieveModel" msrs:HelpLink="http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsCannotRetrieveModel&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=11.0.5058.0"
xmlns:msrs="http://www.microsoft.com/sql/reportingservices">Erro ao carregar o modelo para o item ou a fonte de dados 'http://gasmignethml/BICenter/Galeria%20PowerPivot/BIGASMIG.bism'.
Verifique se as informações de conexão estão corretas e se você tem permissões para acessar a fonte de dados.</Message><MoreInformation><Source>Microsoft.ReportingServices.ProcessingCore</Source><Message msrs:ErrorCode="rsErrorOpeningConnection"
msrs:HelpLink="http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsErrorOpeningConnection&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=11.0.5058.0"
xmlns:msrs="http://www.microsoft.com/sql/reportingservices">Não é possível criar uma conexão com a fonte de dados 'TemporaryDataSource'.</Message><MoreInformation><Source>Microsoft.AnalysisServices.AdomdClient</Source><Message>A
connection cannot be made to redirector. Ensure that 'SQL Browser' service is running.</Message><MoreInformation><Source>System</Source><Message>The
requested name is valid, but no data of the requested type was found</Message></MoreInformation></MoreInformation></MoreInformation></MoreInformation><Warnings xmlns="http://www.microsoft.com/sql/reportingservices"
/></detail>
Any help will be very welcome.
Thanks in advance
abcoura | osmanos.org -
Syntax error while creating Calculation view script based
Hi Folks,
I'm creating Calc view based on script and drafted a simple code but I'm getting syntax error.
Its just fetching few coloumns from two tables products and purchaseorderitem.
/********* Begin Procedure Script ************/
BEGIN
var_out = select productid , category, nameid, currency, grossamount, quantity
FROM sap.hana.democontent.epm.data.products AS P , sap.hana.democontent.epm.data.purchaseorderitem AS B
where P.productid = B.productid;
END /********* End Procedure Script ************/
Could you pls take a look and let me know what wrong I'm doing?
Error logs are:-
sap.hana..package.project.folder.mytest.CALCSCRIPTVIEWInternal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Calculation View: SQL: sql syntax error: incorrect syntax near "democontent": line 5 col 18 (at pos 439)nSet Schema DDL statement: set schema "SYSTEM"nType DDL: create type "_SYS_BIC"."sap.hana..package.project.folder.mytest/CALCSCRIPTVIEW/proc/tabletype/VAR_OUT" as table ("PRODUCTID" NVARCHAR(10), "CATEGORY" NVARCHAR(2), "NAMEID" NVARCHAR(10), "CURRENCY" NVARCHAR(5), "GROSSAMOUNT" DECIMAL(15,2), "QUANITYT" DECIMAL(13,3))nProcedure DDL: create procedure "_SYS_BIC"."sap.hana.package.project.folder.mytest/CALCSCRIPTVIEW/proc" ( OUT var_out "_SYS_BIC"."sap.hana.package.project.folder.mytest/CALCSCRIPTVIEW/proc/tabletype/VAR_OUT" ) language sqlscript sql security definer reads sql data as n /********* Begin Procedure Script ************/ n BEGIN n t var_out = select productid , category, nameid, currency, grossamount, quantityn t FROM sap.hana.democontent.epm.data.products AS P , sap.hana.democontent.epm.data.purchaseorderitem AS Bn t where P.productid = B.productid;nnEND /********* End Procedure Script ************/nHi Rubane,
I don't have EPM installed here but based on this Table User Defined Functions( Table UDF ) in HANA you are not properly defining the source table.
In your case missing 1) schema of EPM, 2) not using double quotes, 3) separation of package and view, 4) missing camel case on purchaseOrderItem:
FROM sap.hana.democontent.epm.data.products AS P , sap.hana.democontent.epm.data.purchaseorderitem AS B
On blog:
from "SAP_HANA_EPM_DEMO"."sap.hana.democontent.epm.data::businessPartner" as a
SAP_HANA_EPM_DEMO is the schema
sap.hana.democontent.epm.data is the package
businessPartner is the view
Start simple... before the seletion try it out on Studio SQL.
Regards, Fernando Da Rós -
Error while creating Materialized View in AWM
Hello,
I am using Oracle 11g with Analytic WorkSpace Manager 11.1.0.6.0A
I am trying to create materialized view on my Cube..
The Cube has 5 Dimensions out of which Four are having two levels i.e.,
TotalA-->DimensionA
TotalB-->DimensionB...and so on
And one time Dimension having 4 levels
TotalTime-->YEAR-->QUARTER-->MONTH
When i try to create the materialized view, i get an error saying that
"Your metadata changes have been saved, with the following errors
CREATE MATERIALIZED VIEW "ENT.CB$TIME_TIME_HIER"
ORA-02267:column type incompatible with referenced column type"
When i googled regarding this error, it says to change the datatype of the column..
But which column's data type is to be changed..Please throw some light regarding this...
Awaiting for reply..My query is as follows:
SELECT
sum(cd.SALESAMT *(case when (k.LEVEL_NAME = 'ALL_product' AND l.level_name='ALL_MODE' AND m.LONG_DESCRIPTION = 'Type1')then 1 else 0 end)) as Cumm_Type1Txn_Amount,
sum(cd.SALESAMT *(case when (k.LEVEL_NAME = 'ALL_product' AND l.level_name='ALL_MODE' AND m.LONG_DESCRIPTION = 'Type2')then 1 else 0 end)) as Cumm_Type2Txn_Amount,
sum(cd.SALESAMT *(case when (k.LONG_DESCRIPTION='product1'AND l.level_name='ALL_MODE'AND m.LONG_DESCRIPTION = 'Type1' )then 1 else 0 end)) as Cumm_product1_Type1Txn_Amount,
sum(cd.SALESAMT *(case when (k.LONG_DESCRIPTION='product1'AND l.level_name='ALL_MODE'AND m.LONG_DESCRIPTION = 'Type2')then 1 else 0 end)) as Cumm_product1_Type2Txn_Amount,
sum(cd.SALESAMT *(case when (k.LEVEL_NAME = 'ALL_product' AND l.LONG_DESCRIPTION='Mode1'AND m.LONG_DESCRIPTION = 'Type1')then 1 else 0 end)) as Cumm_Mode1_Type1Txn_Amount,
sum(cd.SALESAMT *(case when (k.LEVEL_NAME = 'ALL_product' AND l.LONG_DESCRIPTION='Mode1'AND m.LONG_DESCRIPTION = 'Type2')then 1 else 0 end)) as Cumm_Mode1_Type2Txn_Amount,
sum(cd.SALESAMT *(case when (k.LEVEL_NAME = 'ALL_product' AND l.LONG_DESCRIPTION='Mode2'AND m.LONG_DESCRIPTION = 'Type1')then 1 else 0 end)) as Cumm_CLRING_Type1Txn_Amount,
sum(cd.SALESAMT *(case when (k.LEVEL_NAME = 'ALL_product' AND l.LONG_DESCRIPTION='Mode2'AND m.LONG_DESCRIPTION = 'Type2')then 1 else 0 end)) as Cumm_Mode2_Type2Txn_Amount,
sum(cd.SALESAMT *(case when (k.LEVEL_NAME = 'ALL_product' AND l.LONG_DESCRIPTION='Mode3'AND m.LONG_DESCRIPTION = 'Type1')then 1 else 0 end)) as Cumm_TRSFER_Type1Txn_Amount,
sum(cd.SALESAMT *(case when (k.LEVEL_NAME = 'ALL_product' AND l.LONG_DESCRIPTION='Mode3'AND m.LONG_DESCRIPTION = 'Type2')then 1 else 0 end)) as Cumm_Mode3_Type2Txn_Amount,
sum(cd.SALESAMT *(case when (k.LEVEL_NAME = 'ALL_product' AND l.level_name='ALL_MODE' AND m.level_name = 'ALL_TYPE')then 1 else 0 end)) as Cumm_Txn_Amount,
sum(cd.SALESAMT *(case when (k.LEVEL_NAME = 'ALL_product' AND l.long_description='Mode3' AND m.level_name = 'ALL_TYPE')then 1 else 0 end)) as Cumm_Mode3_Txn_Amount,
sum(cd.SALESAMT *(case when (k.LEVEL_NAME = 'ALL_product' AND l.long_description='Mode2' AND m.level_name = 'ALL_TYPE')then 1 else 0 end)) as Cumm_Mode2_Txn_Amount,
sum(cd.SALESAMT *(case when (k.long_description = 'product1' AND l.level_name='ALL_MODE' AND m.level_name = 'ALL_TYPE')then 1 else 0 end)) as Cumm_product1_Txn_Amount,
sum(cd.SALESAMT *(case when (k.long_description = 'product1' AND l.long_description='Mode1' AND m.LONG_DESCRIPTION = 'Type1')then 1 else 0 end)) as Cumm_product1Mode1Type1_Txn_Amount,
sum(cd.SALESAMT *(case when (k.long_description = 'product1' AND l.long_description='Mode1' AND m.LONG_DESCRIPTION = 'Type2')then 1 else 0 end)) as Cumm_product1_Mode1_Type2_Txn_Amount,
sum(cd.SALESAMT *(case when (k.long_description = 'product1' AND l.long_description='Mode1' AND m.level_name = 'ALL_TYPE')then 1 else 0 end)) as Cumm_product1_Mode1_Total_Txn_Amount
/* From dimension views and cube view */
FROM CUSTOMER_ID_CUSTOMER_ID_HIE_VIEW b,
TIME_TIME_HIER_VIEW j,
product_product_HIER_VIEW k,
MODE_MODE_HIER_VIEW l,
TYPE_TYPE_HIER_VIEW m,
CUBETEST_VIEW cd
/* Create level filters */
WHERE b.level_name = 'CUSTOMER_ID'
AND b.LONG_DESCRIPTION='xyz'
AND j.LEVEL_NAME='MONTH'
AND j.END_DATE between to_date('2007-10-31','YYYY-MM-DD') and to_date('2007-10-31','YYYY-MM-DD')
/* Join dimension views to cube view */
AND b.DIM_KEY=cd.ACCOUNT_ID
AND j.DIM_KEY=cd.TIME
AND k.DIM_KEY=cd.product
AND l.DIM_KEY=cd.MODE
AND m.DIM_KEY=cd.TYPE
ORDER BY j.end_date,
k.level_name,
l.level_name,
m.level_name;
Maybe you are looking for
-
Jlaunch restarts in Dev not in PROD - any specific settings
Hi all In our EP 7.0 SPS 06, when we execute the "Export to Excel" button to export the analysis report to excel, its normally very very slow. But in Development server, it hangs for 1 min and then automatically the jlaunch process gets restarted. Wh
-
Same itunes library for 2 iphones on 2 computers?
Me and my brother would like to use both of our iphones on the same library but also access that library from different computers. Is this possible and how?
-
External Hard drive and dmg files not mounting
External Hard drive and dmg files suddenly not mounting. Im running Mavericks on 27" iMac. Anyone have a fix or has anyone else suddenly had this problem? There was a Mavericks update a few weeks ago, but things were fine until today. This is weird.
-
Sehr geehrte Damen und Herren, wie telefonisch mit dem Kundensupport abgesprochen übersenden wir die Fehlermeldungen inkl. Systeminformationen. Folgendes Problem: Wir arbeiten mit dem Redaktionssystem (InDesign und InCopy CS6). Beim aktualisieren der
-
Hi ALL, We have a problem in configuring FR. I have attached the config.log at the end The following is the architecture: Hyperion Version : 9.2.1 DBTIER: Node A: Unix ( No Essbase) MTTIER: Node B: Windows -HFM Mid Tier - Microsoft IIS Web Server Nod