How to create analytic view with tables VBRK VBRP KONV ?
Hi Gurus,
What is the best way to combine in a analytic view tables VBRK VBRP and KONV for better optimization or
how to make the relationship tables VBRK VBRP KONV with better performance in Hana Studio ?
This analytic view should be used in a calculation view to the final calculations.
Thanks !
Hi Rogerio,
Greetings.
Basically , when you design your analytic views , while designing your data foundation , you can directly join the tables with the corresponding key attributes . Analytic views are capable of optimizing the join operation when we access the view.Logic of joining is purely depends on your business requirement
Sreehari.
Similar Messages
-
How to create a view on tables with different keys?
I have to create a View on:
Z3PVR: Transparent Table
BSEG: Cluster Table
CKIS: Transparent Table
BKPF: Transparent Table
RV61A: Structure
T001: Transparent Table
All the tables have different "Key Fields" and the structure has no "Key Fields". When i create the view, what do I mention in the "JOIN FIELDS" tab. and how do i create the view with the structure?
Please advise.How to create a view on a Non-Transparent Tables.
how to create view?
HELP.. How to create a view with the tables with ALV -
I want to join the table vbrk,vbrp,konv and fields are vbeln, knumv.
i want to join the table vbrk,vbrp,konv and fields are vbeln, knumv is possible .
if it isn't possible. what is the another method output is doc. no.(vbrp-vbeln) condition doc. no.(vbrk-knumv) , condition(konv-kschl), tax rate(konv-mwsk1), quantitty(vbrp-fkimg) .reply pls... as soon as possible..Hi..
This is the Join :
SELECT VBAKVBELN VBRKKNUMV
VBRP~FKIMG
KONV-KSCHL KONV~MWSK`
FROM VBRK
INNER JOIN VBRP
ON VBRKVBELN = VBRPVBELN
INNER JOIN KONV
ON KONVKNUMV = VBRKKNUMV
INTO TABLE <ITAB>
WHERE <CONDITION>.
REWARD IF HELPFUL. -
I want to join the table vbrk,vbrp,konv but konv is cluster table .
Hi
konv is the cluster table . so I want to join the table vbrk,vbrp,konv and fields are vbeln, knumv is possible .
if it isn't possible. what is the another method output is doc. no.(vbrp-vbeln) condition doc. no.(vbrk-knumv) , condition(konv-kschl), tax rate(konv-mwsk1), quantitty(vbrp-fkimg) .reply pls... as soon as possible..hi
good
1) Open
Select
Mard~matnr
Makt~maktx
From Makt
Inner Join Mard
on Maktmatnr = Mardmatnr
Where Makt~Spras = SY-LANGU
2) Native Oracle
SELECT Mard.matnr,
Makt.maktx
From Makt, Mard
Where Makt.mandt = Mard.mandt
And Makt.matnr = Mard.matnr
And Makt.mandt = :SY-MANDT
And Makt.spras = :SY-LANGU
3) KONV is Cluster - BAD LUCK!
Select VBRK~VBELN
VBRP~POSNR
KONV~KSCHL
KONV~KWERT
From ( VBRK Inner Join VBRP
On VBRKVBELN = VBRPVBELN )
Inner Join KONV
On VBRKKNUMV = KONVKNUMV
And VBRPPOSNR = KONVKPOSN
4) KONV is Cluster - BAD LUCK!
Select KONV~KNUMV
KONV~KPOSN
KONV~KSCHL
KONV~KWERT
From KONV
Where KONV~KNUMV in (
Select VBRK~KNUMV
From VBRK Inner Join VBRP
On VBRKVBELN = VBRPVBELN
Where VBRKKNUMV = KONVKNUMV
And VBRPPOSNR = KONVKPOSN
5) Open
Select VBRP~MATNR
Sum( VBRP~NETWR )
From VBRP
Group By VBRP~MATNR
6) Native Oracle
Select VBRP.MATNR ,
Sum( VBRP.NETWR )
From VBRP
Where mandt = :sy-mandt
Group By VBRP.MATNR
7) Native Oracle
Select VBRP.MATNR ,
Count( VBRP.NETWR ),
Sum( VBRP.NETWR )
From VBRP
Where mandt = :sy-mandt
Group By VBRP.MATNR
8) Open
Select VBRP~MATNR
makt~maktx
Sum( VBRP~NETWR )
From VBRP inner Join MAKT
On VBRPMATNR = MAKTMATNR
Where MAKT~SPRAS = SY-LANGU
Group By VBRPMATNR maktmaktx
9) Native Oracle
Select VBRP.MANDT,
VBRP.MATNR,
MAKT.MAKTX,
Sum( VBRP.NETWR )
From VBRP , MAKT
Where VBRP.MANDT = MAKT.MANDT
And VBRP.MATNR = MAKT.MATNR
And MAKT.SPRAS = :SY-LANGU
Group By VBRP.MANDT, VBRP.MATNR, MAKT.MAKTX
10) Open
SELECT EKET~EBELN
EKET~EINDT
EKET~WAMNG
EKET~WEMNG
From ( ekko INNER JOIN ekpo
ON ekkomandt = ekpomandt
AND ekkoebeln = ekpoebeln
INNER JOIN eket
ON ekpomandt = eketmandt
AND ekpoebeln = eketebeln
AND ekpoebelp = eketebelp
AND EKET~WAMNG > 0
AND EKETWAMNG <> EKETWEMNG
Where EKPO~MATNR = 'NB220'
And EKPO~WERKS In ('P001', 'P004', 'L004')
And EKKO~BSTYP = 'F'
And EKKO~BSART = 'UB'
And EKPO~ELIKZ <> 'X'
And EKKO~LOEKZ <> 'X'
11) Native Oracle
SELECT EKET.EBELN,
EKET.EINDT,
EKET.WAMNG,
EKET.WEMNG
FROM ( ekko INNER JOIN ekpo
ON ekko.mandt = ekpo.mandt
AND ekko.ebeln = ekpo.ebeln
INNER JOIN eket
ON ekpo.mandt = eket.mandt
AND ekpo.ebeln = eket.ebeln
AND ekpo.ebelp = eket.ebelp
AND EKET.WAMNG > 0
AND EKET.WAMNG <> EKET.WEMNG
Where EKPO.MATNR = 'NB220'
And EKPO.WERKS In ('P001', 'P004', 'L004')
And EKKO.BSTYP = 'F'
And EKKO.BSART = 'UB'
And EKPO.ELIKZ <> 'X'
And EKKO.LOEKZ <> 'X'
thanks
mrutyun^ -
How to create a view with a column of counts of the occurence of values
If my table is:
ID
1
2
3
3
5
5
5
I want to create a view with the following result:
ID COUNT
1 1
2 1
3 2
5 3
How would I accomplish this?Sorry, my mistake. I was thinking about counting distinct events.
I created a table with your example values:
You should do a projection with a calculated column = 1:
And then add this calculated column as an aggregated measure on the aggregation node:
Result:
Cheers,
Fernando -
How to create a view with parameters; read the documentation but nothing!
Hello!
I'm new to the Oracle world but together with my coworkers we need to very quickly study Oracle to figure out whether we'll add Oracle to our list of supported databases or not.
Question: How do I create a view with parameters?
I've read the documentation but I could not find this! I found the sql syntax to create a view but no parameters whatsoever...
I have found on the web some very complicated way of doing this, but doesn't Oracle support Views with parameters?
The goal here is to return a recordset, don't forget, so,please don't speak about stored procedures unless you are going to tell me how to get a recordset out of a stored procedure! ;)
Thanks for all your help and attention!
Jorge C.You can set up a parameterized view via context as follows:
1. Set up a procedure to set your context values:
create or replace procedure p_set_context (p_context IN VARCHAR2,p_param_name IN VARCHAR2,p_value IN VARCHAR2)
as
BEGIN
sys.dbms_session.set_context(p_context,p_param_name,p_value);
END;
2. Create your context using the procedure you just created
create or replace context my_ctx using p_set_context
3. This is the test table I'll use
create table my_table(col1 number)
and populate it:
begin
for v_index in 1..10
loop
insert into my_table values(v_index);
end loop;
end;
and the view that will be parameterised
create or replace view v_my_table as select col1 from my_table where col1 between sys_context('my_ctx','start_range') and sys_context('my_ctx','end_range')
4. Now set the parameters using the procedure above.
begin
p_set_context('my_ctx','start_range','1');
p_set_context('my_ctx','end_range','5');
end;
5. Selecting from my_table will give you 1 to 10 (no surprise there :-) )
selectng from v_my_table will give you 1 to 5
You can use the context to set formats etc using the same principle. A common gotcha to watch for is trying to set the context directly using DBMS_SESSION.SET_CONTEXT instead of creating a procedure. This belongs to SYS and SYS won't have the privileges to set your context so you get an insufficient privileges result leading to much headscratching and unnecessary grants (at least that's my understanding of it).
Sorry Jorge, as you're new to Oracle I should also have pointed out for completeness sake, that you can change the parameters at any time through recalling the p_set_context, for example, following on from above, after your "select * from v_my_table" and seeing 1 to 5, you could then do
begin
p_set_context('my_ctx','start_range','3');
end;
and when you requery 'Select * from v_my_table' you will now see rows 3 to 5.
Bit of a simplistic example, but you can see how easy it is. :-)
Message was edited by:
ian512 -
How to create a view with Oracle apps Org initialization ?
Hi,
How to create a view which needs Oracle apps org initialization to provide the correct data .
The purpose of the view is to be accessed in Primavera DB via a DB link for reporting purpose.
So how should the org be initialized so that the view returns the correct data when accessed from the remote data base using the DB link?
EX: step1 run fnd_client_info.set_org_context for the org
step2 query the veiw returns correct data in Oracle.
How can this be achieved if the view needs to be accessed via DB link?
sample view sql :
select po_header_id
from po_distributions_all pod
where (apps.po_intg_document_funds_grp.get_active_encumbrance_func
('PO',
pod.po_distribution_id
) <> 0
Thanks in advance!
DarshiniHi,
This is not possible in Oracle. What u can do is create the view without the where clasue and supply the where clause at runtime.
Hope this helps...
Regards,
Ganesh R -
How to create a view with parameter?
who can tell me hwo to create a view with
parameters just like a cursor?Hi,
This is not possible in Oracle. What u can do is create the view without the where clasue and supply the where clause at runtime.
Hope this helps...
Regards,
Ganesh R -
How to create a view with columns from multiple rows
I have posted this in SQL/PSL forum, but I hope database experts in this group can give me ideas too, also the need is from BI reports.
I have a table, say, project_milestones, which has these columns in concern:
proj_id, milestone_name, actual_end_date
with data:
proj_id, milestone_name, actual_end_date
===== ================ ==============
1001, Key Element Approve, 2009-10-02
1001, Final Synopsis, 2009-10-07
1001, Final Protocol Approved, 2009-10-15
1001, FPFV, 2010-01-10
1001, LPFV, 2010-03-12
1002, Key Element Approve, 2008-12-02
1002, Final Synopsis, 2009-01-07
1002, Final Protocol Approved, 2009-01-12
1002, FPFV, 2009-03-30
1002, LPFV, 2009-10-04
There are about 10 milestones in each project.
I have to create a view to flat these data at project level, looks like this:
proj_id, key_element_date, final_synopsis_date, final_protocol_approved_date, FPFV_date, LPFV_date, key_element_to_final_synopsis_days, final_synopsis_final_protocol_days, ....
How can I do this?
Thanks,user9175541 wrote:
I have posted this in SQL/PSL forum, but I hope database experts in this group can give me ideas too, also the need is from BI reports.
I have a table, say, project_milestones, which has these columns in concern:
proj_id, milestone_name, actual_end_date
with data:
proj_id, milestone_name, actual_end_date
===== ================ ==============
1001, Key Element Approve, 2009-10-02
1001, Final Synopsis, 2009-10-07
1001, Final Protocol Approved, 2009-10-15
1001, FPFV, 2010-01-10
1001, LPFV, 2010-03-12
1002, Key Element Approve, 2008-12-02
1002, Final Synopsis, 2009-01-07
1002, Final Protocol Approved, 2009-01-12
1002, FPFV, 2009-03-30
1002, LPFV, 2009-10-04
There are about 10 milestones in each project.
I have to create a view to flat these data at project level, looks like this:
proj_id, key_element_date, final_synopsis_date, final_protocol_approved_date, FPFV_date, LPFV_date, key_element_to_final_synopsis_days, final_synopsis_final_protocol_days, ....
How can I do this?
Thanks,Create a pivot table and put "milestone_name" in the Columns section under the Labels.
Put "actual_end_date" in the Measures section and change the Aggregation Rule to "Max."
The rest of the attributes keep in Rows section. -
How to create materialized view with parameter and index ?
Hi all,
i am using oracle 11g.
i want to create parameter materialized view with two parameter (STORED_VALUE, LOV_NAME) with an index .
i have below view
CREATE OR REPLACE FORCE VIEW SR_MY_TEST(DISPLAYED_VALUE, STORED_VALUE, LOV_NAME) AS
SELECT DISPLAYED_VALUE , LOVVALUE.STORED_VALUE , lovname.lov_name
FROM (SELECT T.LOV_VALUE_ID,
T.LOV_ID,
T.ORG_ENTITY_ID,
T.STORED_VALUE,
T.DISPLAYED_VALUE,
T.ENTERPRISE_ID
FROM MS_QS_LIST_OF_VALUES_T T) lovvalue, ms_qs_lov_names lovname
WHERE lovvalue.lov_id = lovname.lov_id
AND lovvalue.org_entity_id = 1
and LOVVALUE.ENTERPRISE_ID = 100000
AND LOVNAME.ENTERPRISE_ID = 100000;
i want to create index on STORED_VALUE, LOV_NAME
Thanks
DambyNo.AFAIK, there's nothing called as "parameterized MV".
Materialized View store data like tables (and not like Views). So, does it make sense when you say - "table with parameters" ?
Could you please explain your business requirement?
What is the purpose behind those 2 parameters? -
Analytic View with tables from different schema
Hi,
I'm curious if I make something wrong or if this is not possible:
I want to use two tables each in a different schema. I can drop them into the DataFoundation, can connect them, assign them some measure. But activation fails due to insufficient privileges. When I use the tables from the same schema activation works well. With the insufficient privileges I would guess HANA cannot create a View (failed with the statement CREATE COLUMN_VIEW "_SYS_BIC"."USER/ANALYTIC_VIEW_NAME"....).
Since I tried the same assignment with the System-User and failed I wonder what kind of permissions are required. Or is this generally not allowed (resp. prohibited)?
If not allowed, could somebody give me a hint, why its not possible?
If it is possible, what kind of rights are required to get it working?
rolandHm', I have allowed SYS_REPO the rights to the table and was able to activate the view. But now I have the problem, that the DataPreview is not working (again insufficient privileges). What user has to have additional permissions for the JDBC-query?
Do I have to take care more on the privileges for other things? -
How to create a view with "WITH CLAUSE"
Hi,
I have a query with "WITH" CLAUSE , I need to create a view on this query. But I am getting error like
ORA-32034 : Unsupported sue of WITH clause.
Please help me...!!
Please find below my query...!!
WITH RANGE
AS (SELECT A.MASTERMACHINEID,
a.startdate,
a.enddate,
a.startdate - (1 / 3) + (lvl) * 1 / 3 SHIFT_ST_DT,
a.startdate + (lvl) * 1 / 3 AS SHIFT_END_DT,
a.quantity,
(LEAST ( enddate, TODATE) - GREATEST ( FROMDATE, startdate)) * 24 TOTAL_HRS,
(enddate - startdate) * 24 AVAIL,
todate,
fromdate
FROM OMP A,
(SELECT LEVEL lvl
FROM (SELECT MAX (enddate - startdate) AS diff FROM OMPWORKORDER)
CONNECT BY LEVEL <= (diff) * 3),
MASTER B
WHERE A.MASTERMACHINEID = B.MASTERMACHINEID
AND lvl / 3 <=(enddate - startdate) + 1
ORDER BY SHIFT_ST_DT)
SELECT shift_date,
shift_num,
shift_hrs,
DECODE (SIGN (SHUT_DWN_TIME), -1, 0, SHUT_DWN_TIME),
8 - DECODE (SIGN (SHUT_DWN_TIME), -1, 0, SHUT_DWN_TIME) shift_avail_hrs,
qty,
total_qty
FROM (SELECT TRUNC (SHIFT_ST_DT) shift_date,
ROW_NUMBER () OVER (PARTITION BY TRUNC (SHIFT_ST_DT) ORDER BY SHIFT_ST_DT) shift_num,
8 shift_hrs,
(LEAST ( SHIFT_END_DT, TODATE) - GREATEST ( FROMDATE, SHIFT_ST_DT)) * 24
SHUT_DWN_TIME,
quantity / (avail - TOTAL_HRS) qty,
round(((SHIFT_END_DT - SHIFT_ST_DT) * 24 - (LEAST (SHIFT_END_DT, TODATE) - GREATEST (FROMDATE, SHIFT_ST_DT)) * 24) * QuantiTY / (AVAIL - TOTAL_HRS),2)
TOTAL_QTY
FROM RANGE A );Regards
KPR
Edited by: BluShadow on 17-Mar-2011 09:48
added {noformat}{noformat} tags for readabilityTry creating view on following query, if it can help you:
SELECT shift_date,
shift_num,
shift_hrs,
decode(SIGN(shut_dwn_time), -1, 0, shut_dwn_time),
8 -decode(SIGN(shut_dwn_time), -1, 0, shut_dwn_time) shift_avail_hrs,
qty,
total_qty
FROM
SELECT TRUNC(shift_st_dt) shift_date,
row_number() over(PARTITION BY TRUNC(shift_st_dt)
ORDER BY shift_st_dt) shift_num,
8 shift_hrs,
(least(shift_end_dt, todate) -greatest(fromdate, shift_st_dt)) *24 shut_dwn_time,
quantity /(avail -total_hrs) qty,
ROUND(((shift_end_dt -shift_st_dt) *24 -(least(shift_end_dt, todate) -greatest(fromdate, shift_st_dt)) *24) *quantity /(avail -total_hrs), 2) total_qty
FROM
SELECT a.mastermachineid,
a.startdate,
a.enddate,
a.startdate -(1 / 3) +(lvl) *1 / 3 shift_st_dt,
a.startdate +(lvl) *1 / 3 AS
shift_end_dt,
a.quantity,
(least(enddate, todate) -greatest(fromdate, startdate)) *24 total_hrs,
(enddate -startdate) *24 avail,
todate,
fromdate
FROM omp a,
(SELECT LEVEL lvl
FROM
(SELECT MAX(enddate -startdate) AS
diff
FROM ompworkorder)
CONNECT BY LEVEL <=(diff) *3),
master b
WHERE a.mastermachineid = b.mastermachineid
AND lvl / 3 <=(enddate -startdate) + 1
ORDER BY shift_st_dt
) a
;Regards,
Dipali.l -
How to create a view in table DB for a few servers
Hi
We need to create a table Country that will hold the countries data.
I would like to create it in a way that it will be common for all the servers - but as a view. not the real table, only a view to see the data and not to change it.
How do I do it?
Thanks in advanceHi,
+Other servers - i meant other table spaces.+
+I need the same table to be read from other table spaces .+
+I have 2 table spaces:+
+1. OBITUARIESCS+
+2. ADVERTISEMENTCS+
+I would like to create one table in OBITUARIESCS that will have a i don't know how to call it - but another access from ADVERTISEMENTCS.+
+Why do I need it?+
+Because when I work with my application I have to define the DB. and I want to define only ADVERTISEMENTCS but to use one table from OBITUARIESCS with a view or something like that+- See, Basically When you created a User, he will be assigned a default tablespace where the tables are stored when the user created. As as per requirement you can assigned some quota or unlimited permissions on list of tablespaces
to the user. Based on the your Application he can create the tables in respective tablespaces.
Now, coming to the problem if the respective user which you are accessing is stored the table in "OBITUARIESCS" tablespace, then the table will not be there in "ADVERTISEMENTCS" tablespace. At user level he can access the data from both the tablespaces.
As you said above that one process should access "ADVERTISEMENTCS" and view from "OBITUARIESCS".
If you the application user is having the rights on the "ADVERTISEMENTCS" then he can not access the "OBITUARIESCS" which might belongs to different users schema. For that try to Grant the privileges on that certain table to required users which your application is using. That's solves your problem based on my understanding with your question.
@ justin -- I am late sir.
Pavan Kumar N
Edited by: Pavan Kumar on Nov 26, 2008 9:10 PM -
How to create Function Module with TABLE parameter (for internal table)
Hi Guys,
I am trying to create a function module by using TABLE parameter. I have to pass an internal table to this function module for processing.
But it saying : TABLES parameters are obsolete!
And I am not going further.
Please suggest any work arround.
ThanksHi,
create a table type in SE11..
Then use that in your function module importing/exporting/changing parameter for passing internal tables..
Thanks,
Naren -
How can i create a view with jdevlopper 10132
hi,
i want to know how to create a view with JDeveloper 10132.
thanksSorry, but I had to jump in here.
7rouz - you've certainly violated the 10 commandments for posting here...
Do you want to:
1). Create a database view directly in the database
2). Model a database view using the database modeller
3). Create an ADF BC View Object
4). Create some type of visual object (web page, Swing panel)
5). something else.
Your question is too ambiguous to yield an answer, unless by luck.
Regards,
John
Maybe you are looking for
-
JTree custom renderer setting selection background color problem
Hi, I have a JTree with a custom icon renderer that displays an icon. The JTree is part of a TreeTable component. Iam having a problem setting the selection background uniformly for the entire row. There is no problem when there is no row selected in
-
Unable to save PDF files (sometimes?)
Hi All, There are times when I'm working with Elements 6.0 that everything is working normally. I can play and adjust and save files to my little hearts desire. There are other times when I'll open a file, make my adjustments, save the file and when
-
Hi, 2 entities PROJECT and EMPLOYEE; with two 1:N relations between these two entites : "commercial representative" and "manager". a projet has one manager (employee) and a projet has one commercial repr. By default (naming templates), the fk columns
-
Pr 1.2 firmware to n900
I put two posts in the forum about the new firmware pr 1.2 and they were erased from the nokia. Does the new firmware 1.2 taboo subject here in the forum?
-
5800 + bh-103 problem with bluetooth connection
Hello, I have nokia 5800 xpressmusic with Version 30.0.011.C03.01 that was issued for the phone in 29/06/09. I also bought bh-103 bluetooth stereo handsfree and to my pity i realized that from time to time the bluetooth connection between my 5800 an