How to create view in OBIEE
I have table 'Table 1' with columns Attr1,Attr2,Measure 1,Measure 2.I need to create view in the repository from table with Attr1,Measure1 and new Attribute 3 with values as flag 'Y' in to it.What will be the SQL for the new view.Please provide the exact Syntax for the view.
Thanks in Advance
Hi Hsekar,
The view SQL Syntax is standard ANSI SQL. From what I understand, you have a table named "Table 1" which has four columns, "Attr1", "Attr2", "Measure 1", "Measure 2". You want to create a new measure named "Attribute 3" (I'd recommend not having spaces in your column and table names FYI).
If that's correct, then try this
1. In the physical layer, change the object type to view.
2. Put the following SQL in the box
Select "Table 1"."Attr 1","Table 1"."Measure 1", 'Y' "Attribute 3"
From "Table 1"
3. Define your columns in the object appropriately.
That should do it for you.
-Joe
Similar Messages
-
How to create views in OBIEE?
Hi everyone,
I'm new to OBIEE. My requirement is i need to apply different filters to each columns in a report. But if i apply any filter it is applying to all the columns.
For example, My report column is something like
StudentsPassed || StudentsFailed || StudentsTrasnfered
So i need to look up on a status column and need to show only a particular result based on the status column. But if i select for status=StudentsPassed then in all three column im getting only students passed.
So what i did is i created individual views for each column. i.e View1 will hold the list Students Passed view2 will hold only list of Students Failed. But now i need to generate many reports of same type. So i don't think it is a best idea to create views for each columns in a report in the database level.
Is there any method to do this?
Is there any method to store only Students Passsed list in a logical column in the Administration level?
Please provide some help.
Thanks in advance,
karthickWhat are you trying to get?
This is normal error, you must use measure in FILTER (USING), you are using maybe foreign key in count distinct or some other columns that is not a measure.
1. If you like to use FILTER (USING) go to RPD, BMM and make new measure, etc MEASURE2=count(distinct student_id), etc.
Then applied this MEASURE2 in FILTER(MEASURE2 USING (VEE_TOTAL.STATUS = 3.00)
or
2. Use views as I explained before
Regards
Goran
http://108obiee.blogspot.com -
How to create view for xmltype table in oracle
hi:
Can some one help me how to create view for xmltype table in oracle?
XMLType do not have column
SemThank you !!
I read it and become very hard to implement what I want to do.
Can you give me example please?
My main goal to create view for xmltype table is to XQuery the XML data?
Do you have any other suggestion?
Please help
Ali_2 -
How to create view like Facebook - Profile, Wall portion in my iphone apps
Hi,
I have to create same that type of view for my application. my requirement like that i have one question and user can give answer of my question with unlimited number of lines. SO obviously we have to use UITableView. Now problem is that how can i decide my table row height and if there is two lines then answer portion should be small and if answer portion is big then it should be large with unlimited answers.
Does anyone know how to create this type of table view.
Thanks.
Message was edited by: crazyiphonyHi,
i suggest reading some documentation. First you nedd to "tell" the tableView that it's rows are of different height. So you need to implement "tableView:heightForRowAtIndexPath:"
To calculate the height needed for a specific text you can use one of the "sizeWithFont" methods of NSString class. (http://developer.apple.com/iphone/library/documentation/UIKit/Reference/NSStringUIKitAdditions/Reference/Reference.html) -
How to CREATE VIEW to merge two tables each of which has CLOB-typed column
I failed in creating a view to merge two tables that have CLOB-type column each.
The details are:
Database: Oracle 9i (9.2.0)
Two tables "test" and "test_bak", each of which has the following structure:
ID Number(10, 0)
DUMMY VARCHAR2(20)
DUMMYCLOB CLOB
The following operation fails:
create view dummyview (id, dummy, dummyclob) as
select id, dummy, dummyclob from test
union
select id, dummy, dummyclob from test_bak;
I was announced:
select test.id, test.dummy, test.dummyclob
ERROR in line 2:
ORA-00932: inconsistent data type: required - , but CLOB presented.
But if creating views from only ONE table with CLOB-type columns, or from two tables WITHOUT CLOB-typed columns, the creation will succeed. The following 1) and 2) will succeed, both:
1) one table, with CLOB-typed column
create view dummyview (id, dummy, dummyclob) as
select id, dummy, dummyclob from test;
2) two tables, without CLOB-typed columns
create view dummyview (id, dummy) as
select id, dummy from test
union
select id, dummy from test_bak;
I want to merge the two tables all, with complete columns, how to write the CREATE VIEW SQL statement?
many thanks in advanceDong Wenyu,
No.
But you could do this:
SELECT source.*, nvl (tab1.clob_column, tab2.clob_column)
FROM your_table1 tab1, your_table2 tab2, (
SELECT primary_key, ...
FROM your_table1
UNION
SELECT primary_key, ...
FROM your_table2
) source
WHERE source.primary_key = tab1.id (+)
AND source.primary_key = tab2.id (+)
In other words, do the set operation (UNION (ALL)/INTERSECT/MINUS) on just the PK columns before pulling in the LOB columns.
d. -
How to create report in OBIEE 11g?
Hi,
I am new to OBIEE 11g.
Please help me, How to create new report in OBIEE 11g.
Thanks in advance,
A. kavyaTry here: https://apexapps.oracle.com/pls/apex/f?p=44785:24:15065577435567::NO::P24_CONTENT_ID,P24_PREV_PAGE:8113,2
-
How to create view that has an update statement
Tools: MS Management Studio SQL 2008 R2
Code:
Create View as Mocha
UPDATE dbo.Cola
SET Login_ID = Replace(PE15,RTRIM(Cast(Login_ID),'')
UPDATE dbo.cola
SET P4 = NullIf(P4,'')
I would like to create a database object "View" to hand it over to a user and run the script. How I would create a a view that would accept an update statement. Are any work around to accomplish this goalNot quite sure what you want to achieve.
However, if your view displays rows from a single table and each row relates to exactly one row in the source table (no aggregates, no join, no transformation) then you can update it. The update will be executed on the table it refers to.
If you view is more complex, contains joins, aggregates and such, you can create a trigger on it to update the base table(s).
The conditions for a view to be updatable are a little more complex then what I wrote but you can find it here under "updatable view":
http://msdn.microsoft.com/en-CA/library/ms187956.aspx
In the end, you would have a view which displays rows and can be updated.
If all you want is to modify rows without viewing them then HuaMin Chen's solution is the one for you, create a stored procedure instead. -
Hi Experts,
I need to create view from joining 4 Tables in SAP R/3 in SE11 Transaction. Can you please let me know step by step the procedure to create the view.
Thanks
PadmaHi Padma,
Welcome to SDN . Please use the below link to get the information about view
Re: how to create a view?
But please search SDN before posting and post the message in the correct forum ( ABAP) to get the faster response.
Thanks & Regards,
Raja -
In generic extration how to create view
HI
In se11 i try to create view using two table vbap and vbak .
vbak mandt vbap mandt
vbak vbeln vbap vbeln for join condion
and also i fill view field tab but the view is no cretated. It give error field name MANDT is not unique. please anyoone clar the error.
By
RajanHi Rajan,
You cannot use one field twice in a View.
If you need the Field "MANDT" from both the tables, change the description as MANDT_VBAK & MANDT_VDAT in View Field column & select it from the respective tables in "Table column".
Hope it helps!
Regards,
Pavan -
How to create view with schemabinding on cross datbases(partitioned views)
Hello Everyone,
Please help me to sort this issue. I know it is not possible bind the scheman in below example. But is there any solution to solve this issue.
I've tables like below
create database D1--First database
create table dbo.t1(
id int
create database D2--Second database
create table dbo.t2(
id int
i want to create a view with the schema binding option on this
create database D3
use d3
create view vw_v1
with schemabinding
as
select id from d1.dbo.t1
union all
select id from d2.dbo.t2
I'm getting this below error
Msg 4512, Level 16, State 3, Procedure vw_v1, Line 7
Cannot schema bind view 'vw_v1' because name 'd1.dbo.t12' is invalid for schema binding. Names must be in two-part format and an object cannot reference itself.
Many thanks
A-ZSQLCREATE VIEW
SCHEMABINDING
Binds the view to the schema of the underlying table or tables. When SCHEMABINDING is specified, the base table or tables cannot be modified in a way that would affect the view definition. The view definition itself must first be modified or dropped to remove
dependencies on the table that is to be modified.
> When you use SCHEMABINDING,
the select_statement must include the two-part names (schema.object)
of tables, views, or user-defined functions that are referenced.
>
All referenced objects must be in the same database.
José Diz Belo Horizonte, MG - Brasil -
How to create view on bkpf and bseg?
friends,
can we create views on bkpf and bseg if yes wht are the steps...please note it down n send me..regards essam ([email protected])Hi,
Use standard views...
View name Short text
BKPF_AEDAT BW FI: BKPF Extraction Using AEDAT
BKPF_BSAD BW FI: BSAD Extraction Using CPUDT
BKPF_BSAD_AEDAT BW FI: BSAD Extraction using AEDAT
BKPF_BSAK BW FI: BSAK Extraction Using CPUDT
BKPF_BSAK_AEDAT BW FI: BSAK Extraction using AEDAT
BKPF_BSID BW FI: BSID Extraction Using CPUDT
BKPF_BSID_AEDAT BW FI: BSID Extraction using AEDAT
BKPF_BSIK BW FI: BSIK Extraction Using CPUDT
BKPF_BSIK_AEDAT BW FI: BSIK Extraction using AEDAT
CRMV_BKPF_BEBD FI Documents Relevant for Feedback to CRM
V_EWU_BKPF Update View for Parallel Processing on BKPF
V_VBSEGK
V_VBSEGS
Regards,
Omkar. -
How to create view in oracle?
Hi sir,
i have a view created in sql server that i converted in sql developer through translation scratch editor.
but when i am executing this it's not getting executed showing error insufficient privilege.
here is my view below.
CREATE OR REPLACE VIEW vwEmpMain
AS
SELECT Employee.Emp_ID ,
Employee.Emp_FirstName || ' ' || Employee.Emp_LastName Emp_Name ,
Comp_Master.Comp_Name ,
Dept_Master.Dept_Name ,
Desig_Master.Desig_Name ,
Category_Master.Cat_Name ,
Dept_Master.Dept_Desc ,
Category_Master.Cat_Desc ,
Desig_Master.Desig_Desc ,
Comp_Master.Parent_ID HiredBy ,
Employee.Card_ID ,
Employee.Comp_ID ,
Employee.Dept_Code ,
Employee.Cat_Code ,
Employee.Desig_Code ,
Employee.ADDRESS ,
Employee.Phone ,
Comp_Master.STATUS Comp_Status ,
Employee.DOJ Date_Of_Join
FROM Comp_Master
RIGHT JOIN Employee
ON Comp_Master.Comp_ID = Employee.Comp_ID
LEFT JOIN Desig_Master
ON Employee.Desig_Code = Desig_Master.Desig_Code
LEFT JOIN Dept_Master
ON Employee.Dept_Code = Dept_Master.Dept_Code
LEFT JOIN Category_Master
ON Employee.Cat_Code = Category_Master.Cat_Code;
could you check that.
thanksWhenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
>
when i am executing this it's not getting executed showing error insufficient privilege.
>
Always provide the exact error code and message for questions like this.
That error means the user does not have the CREATE VIEW or CREATE ANY VIEW privilege.
The solution is to grant the user CREATE VIEW, for creating views in their own schema, or CREATE ANY VIEW to create views on objects in other schemas.
As SYS 'REVOKE CREATE VIEW FROM SCOTT'. Then as SCOTT
>
create or replace view a_view as select * from emp;
ORA-01031: insufficient privileges
>
It is a different error when the user does not have SELECT privilege on the underlying table or view
As SYS 'GRANT CREATE VIEW TO SCOTT'. Then as SCOTT
>
create or replace view a_view as select * from hr.employees
ORA-00942: table or view does not exist
>
Same if the object does not exist
>
create or replace view a_view as select * from no_such_table
ORA-00942: table or view does not exist
>
But if the table does exist
>
create or replace view a_view as select * from emp; -
How to create view on dates for a given month for matrix
hi all
i have the following 2 tables
Task_Master
Task_ID
Task_Name
Task_Details
Task_ID
Task_Date
Task_Count
Both the tables are linked through primary and foreign keys...just want to create a view where i will provide only month and it will return the days like 1-Oct....2-Oct....3-Oct....4-Oct.....5-Oct.... and the Task_Count value under it ..INPUT IS AS FOLLOWS
01/01/2010 How many ATM's issued Today 20
01/02/2010 How many cheque books issued Today 50
01/03/2010 How many cross cheques Today 50
Result required
Task.....................1-Jan..........2-Jan..........3-Jan.........4-Jan........31-Jan
Atms Issued ..........20..............20..............10..............50..............1
Chequebooks.........34..............56................67.............0................67Hi,
That's called a Pivot , and here's one way to do it:
WITH start_date AS
SELECT TO_DATE ( '01-Jan-2010'
, 'DD-Mon-YYYY'
) AS start_date
FROM dual
SELECT m.task_name
, SUM (CASE WHEN TO_CHAR (d.task_date, 'DD') = '01' THEN 1 END) AS Day_1
, SUM (CASE WHEN TO_CHAR (d.task_date, 'DD') = '02' THEN 1 END) AS Day_2
, SUM (CASE WHEN TO_CHAR (d.task_date, 'DD') = '03' THEN 1 END) AS Day_3
, SUM (CASE WHEN TO_CHAR (d.task_date, 'DD') = '31' THEN 1 END) AS Day_31
FROM task_master m
JOIN task_detail d ON m.task_id = d.task_id
JOIN start_date s ON d.task_date >= s.start_date
AND d.task_date < ADD_MONTHS (s.start_date, 1)
GROUP BY m.task_name
;As posted, this woirks is Oracle 9 (and up).
Starting in Oracle 11, you can also use the SELECT ... PIVOT feature, which is better. -
How to create view/table from other user's view/table
Hi all
I'm using Oracle database 10g.
I create table/view on user XXX, how to I create table/view on user YYY from user XXX.
Thankyou,
Thiensu2810user8248216 wrote:
Hi all
I'm using Oracle database 10g.
I create table/view on user XXX, how to I create table/view on user YYY from user XXX.
Thankyou,
Thiensu2810grant select on xxx.table_name to yyy;
create table/view table/view_name as select * from xxx.table_name; -
How to create View Object with Multiple Updatable Entity Objects
I want both the entities in the view object to support creating new rows but when i give create insert it allows to insert only on the parent and not the child. I found this link
http://docs.oracle.com/cd/E21043_01/web.1111/b31974/bcadvvo.htm#CEGCAJCI which overrides the exiting classes. but i would like to do it declarative . Is there any other way to do it?
I am using Jdeveloper 11g version 2.
Thanks in advance,
RakeshBut when i tried to add a new row it showed this error
oracle.jbo.AttrValException: JBO-27014: Attribute LookupTypeId1 in FoundationModuleAM.VikLookupTypeBaseVO is required.
at oracle.jbo.server.JboMandatoryAttributesValidator.validate(JboMandatoryAttributesValidator.java:224)
at oracle.jbo.server.EntityDefImpl.validate(EntityDefImpl.java:3095)
at oracle.jbo.server.EntityCache.validate(EntityCache.java:3599)
at oracle.jbo.server.EntityImpl.validateEntity(EntityImpl.java:2285)
at oracle.jbo.server.EntityImpl.validate(EntityImpl.java:2464)
at oracle.jbo.server.DBTransactionImpl.validate(DBTransactionImpl.java:4515)
at oracle.insurance.viking.foundation.model.common.VikingDBTransactionImpl.validate(VikingDBTransactionImpl.java:46)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2008)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2352)
at oracle.insurance.viking.foundation.model.common.VikingDBTransactionImpl.commit(VikingDBTransactionImpl.java:37)
at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1590)
at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1415)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1428)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2169)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)
at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)
at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:112)
at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:118)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6289)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6054)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4652)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:603)
at java.awt.EventQueue$1.run(EventQueue.java:601)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:617)
at java.awt.EventQueue$2.run(EventQueue.java:615)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Maybe you are looking for
-
Is it a bad idea to use a single read only Connection?
I am developing a client/server application, where each client request executes in a separate thread. Currently i create a new Connection object for ANY database access. I am wondering if there is any advantage changing this, to use a single Connecti
-
Two Update Rules populating One Infocube
Hi all Im a little confused: 1) I have to add a characteristic to an Infocube.Which I did and also assigned it to an appropriate dimension. 2)There are two update rules populating the Infocube. 3)The new charcteristic that ive added to the cube has t
-
My girlfriend has a iBookG4. It connects to the WRK54G th...
My girlfriend has a iBookG4. It connects to the WRK54G that is positioned in the basement, she is able to surf the web. However , at times websites will time out. She also is unable to have a steady connection on any chat programs such as the MAC's v
-
I just opend an account with MAIL. The trasnfer of my emails worked, but all emails (received and sent ones) from my Gmail account appear in the inbox of mail. All sent ones appear only in the sent box, if I sent them from the mail programm. If I sen
-
How to record in dual-mono with 2 channel audio interface?
I'm using an iPad 3 with an ART 2-channel usb/mixer interace. I use the Camera app for video recording and the audio is routed thru the interface. Works fine except that I can't seem to figure out how to change the default setting of the iPad/Camera