Update Problem - Join With Another Table
I'm trying to convert few MS Access Queries into Oracle. Following is one of the query from MS Access.
<font face="courier">
UPDATE [RESULT] INNER JOIN [MASTER]
ON ([RESULT].[LAST_NAME] = [MASTER].[LAST_NAME])
AND ([RESULT].[FIRST_NAME] = [MASTER].[FIRST_NAME])
AND ([RESULT].[DOCUMENT_NUMBER] = [MASTER].[DOCUMENT_NUMBER])
AND ([RESULT].[BATCH_ID] = [MASTER].[LEAD_ID])
SET [MASTER].[CLOSURE_REASON] = "Closed For Name and Document Number Match",
[MASTER].[RESULT_ID] = [RESULT].[ID],
[MASTER].[RESULT_PID] = [RESULT].[PID]
WHERE (([MASTER].[CLOSURE_REASON] Is Null)
AND ([MASTER].[REC_CODE] = "A1")
AND ([RESULT].[EVENT_DATE] = [MASTER].[EVENT_DATE])
AND ([RESULT].[EVENT_TYPE] = "Open")
AND ([MASTER].[DOCUMENT_NUMBER] Is Not Null)
AND ([MASTER].[DOCUMENT_NUMBER)] "null"));
</font>
First I received ORA-01779: cannot modify a column which maps to a non key-preserved table Error. I followed different examples (including MERGE) from your
site and modified my original query. Now, I receive ORA-30926: unable to get a stable set of rows in the source tables Error.
Most of the examples showed only one join between the tables but I have to make more joins based on my requirements.
Any help translating this query in to Oracle would be Great. Thanks!
Assuming that the columns you are joining to in the result table are the whole PK or are declared as aunique contraint (i.e. some combination of last_name, first_name, document_number, batch_id, event_date, id, and pid make up the entire PK/unique constraint), then the updateable join view should look something like:
update (select m.last_name, m.first_name, m.document_number, m.lead_id,
m.closure_reason, m.result_id, r.id, m.result_pid, r.pid
from master m
join result r
on r.last_name = m.last_name and
r.first_name = m.first_name and
r.document_number = m.document_number and
r.batch_id = m.lead_id and
r.event_date = m.event_date
where m.closure_reason is null and
m.rec_code = 'A1' and
r.event_type = 'Open' and
m.document_number is not null and
m.document_number != 'null')
set closure_reason = 'Closed For Name and Document Number Match',
result_id = id,
result_pid = pidThe merge version would look something like:
merge into master
using (select last_name, first_name, document_number, batch_id,
event_date, id, pid
from result
where event_type = 'Open') r
on (r.last_name = m.last_name and
r.first_name = m.first_name and
r.document_number = m.document_number and
r.batch_id = m.lead_id and
r.event_date = m.event_date)
when mathed then
update
set closure_reason = 'Closed For Name and Document Number Match',
result_id = id,
result_pid = pid
where m.closure_reason is null and
m.rec_code = 'A1' and
m.document_number is not null and
m.document_number != 'null';However, as Hoek pointed out, the combination of last_name, first_name, document_number, batch_id, event_date, id, and pid must point to a unique row in the result table, whether they make up the PK or a unique constraint. If there are, or could be, multiple rows for a particular combination of last_name, first_name, document_number, batch_id, event_date, id, and pid, then you will need to find a way to determine which of those rows should be used to do the update.
John
Similar Messages
-
Join with another table in pre-query
Hi,
We have a large data block and we need to order some columns based on street name for example, not id. The base table of db block contains an id_street column, and 'streets' table contains id and name.
Ok, in pre-query trigger of that block, we have a complex logic and we dynamically build the where clause. At the end, we set the order_By clause of the block, to order the rows, for example we need to order by the 'my_date' column asc (it's a date type column), and street desc; but street NAME, not id. We don't want to use a from clause query, because the dynamically where clause logic it's complex.
How can we join the db block table with 'streets' table in pre-query, so when constructing the order by clause to specify something like
set_block_property('ADRESE_NEZONATE', order_by, 'my_date, name desc');where 'name' is the name of the street, from the 'streets' table.
Is it possible in pre-query, somehow? Or, in my case where can I join with that table and use that column in pre-query at setting order by?
Thanks!
Edited by: Roger25 on 26.04.2013 12:31I understand what you say but partially.. please explain in more detail how to do that;
How should look the adrese_nezonate block, then? I have to add a 'name' column and set copy value from item property to 'STREETS.NAME', and database_property No?
Then the post-query trigger how should look like (the order by clause)? The post-query sends the entire query (with where/order by clauses) to the server, but in that "select... where... order by" (built dynamically) there are only columns from that block (adrese_nezonate). I need to join with streets, INSIDE that query.
Thanks. -
Is it possible to update a query with another query?
I'm trying to update a query with another query (see attached
code). Here's my setup: I've got a table in an Access database in
which I enter a string into a form and update. This string
corresponds to a single record in another table of the same
datasource. The first table has only one record to provide the
second, which has many and will have more. Basically what I'm
wondering is: Is this a valid thing to do in coldfusion? If not
please help with an alterate method. I'm still a novice at
coldfusion.
The overall effect I'm going for is to display the one record
as a featured truck profile on the web site:
www.truckerstoystore.net.
I currently get an error when I try to display the page with the
current query setup.
Check this page to see the error:
www.truckerstoystore.net/currentTOW2.cfm
Help on this issue is very much appreciated.
------------------------------------------------------------------------------------------ -----------------------------------------------------------------------I think this is what you are after
<!--- this query will get all the records from the DB
--->
<cfquery name="cTOW" datasource="tow">
SELECT *
FROM currentTOW
<!--- Do you need to find a particular record in the
database --->
<!--- If so, then you need a 'where' clause in here
--->
</cfquery>
<!-- Loop the cTOW query for each record returned -->
<cfloop query="cTOW">
<!--- For the record returned from the cTOW query you now
need to update the table --->
<!-- Update the table -->
<cfquery name="currentTOW" datasource="tow">
UPDATE Your tblName
SET
Dataname = cTOW.DataValue
</cfquery>
</cfloop>
thats it
PS: I think your original query needs modifying. To return
the exact records that you want to update from the original table.
ie: Primary and foreign key relationship -
Adding a single table without a logical join to another table (OBIEE 10g)
Sometimes I want to just display a single table without a logical join to another table in the repository. However, everytime I move it to the Business Model and Mapping layer and perform a Global Consistency Check, it tells me that it needs a logical join and I am forced to create another table to join to it. Thus creating a dimension-fact relationship. There are times I don't need this relationship and just want to display some data. Is there anyway to get around this?
Thanks in advance!Yes,You have to create a join.You cannot take single table to BMM layer.You can create an alias of the table.Join this alias and base table through any common column and take both tables to BMM and desired table to presentation layer.
Another way is to create a view in physcial layer.Write a select statement like
Select primary_key from Table
Where primary_key is primary key of base table.Join this view ith base table and repeat the steps defined for Alias.
Regards,
Sandeep -
Maximum number of tables that can be outer joined with one table in a query
Hi All,
Iam new to sql, so can you please let me know What is the maximum number of tables that can be outer joined with one table in a query?
Thanks,
Srinisrinu2 wrote:
Iam new to sql, so can you please let me know What is the maximum number of tables that can be outer joined with one table in a query?
There is no limit to the number of tables you can outer join as long as you join them correctly.
SQL> with a as
2 (
3 select 1 id, 2 b_key, 3 c_key from dual union all
4 select 2 id, 1 b_key, 4 c_key from dual union all
5 select 3 id, 3 b_key, 1 c_key from dual union all
6 select 4 id, 4 b_key, 2 c_key from dual
7 ),
8 b as
9 (
10 select 1 id, 1 c_key2 from dual union all
11 select 2 id, 5 c_key2 from dual union all
12 select 3 id, 3 c_key2 from dual union all
13 select 4 id, 2 c_key2 from dual
14 ),
15 c as
16 (
17 select 1 key1, 1 key2, '1-1' dta from dual union all
18 select 1 key1, 2 key2, '1-2' dta from dual union all
19 select 1 key1, 3 key2, '1-3' dta from dual union all
20 select 1 key1, 4 key2, '1-4' dta from dual union all
21 select 2 key1, 1 key2, '2-1' dta from dual union all
22 select 2 key1, 2 key2, '2-2' dta from dual union all
23 select 2 key1, 3 key2, '2-3' dta from dual union all
24 select 2 key1, 4 key2, '2-4' dta from dual union all
25 select 3 key1, 1 key2, '3-1' dta from dual union all
26 select 3 key1, 2 key2, '3-2' dta from dual union all
27 select 3 key1, 3 key2, '3-3' dta from dual union all
28 select 3 key1, 4 key2, '3-4' dta from dual union all
29 select 4 key1, 1 key2, '4-1' dta from dual union all
30 select 4 key1, 2 key2, '4-2' dta from dual union all
31 select 4 key1, 3 key2, '4-3' dta from dual union all
32 select 4 key1, 4 key2, '4-4' dta from dual
33 )
34 select d.a_id, d.b_id, c.key1 as c_key1, c.key2 as c_key3, c.dta
35 from
36 c,
37 (
38 select
39 a.id as a_id, b.id as b_id, a.c_key, b.c_key2
40 from a, b
41 where a.b_key = b.id
42 ) d
43 where d.c_key = c.key1 (+)
44 and d.c_key2 = c.key2 (+);
A_ID B_ID C_KEY1 C_KEY3 DTA
3 3 1 3 1-3
4 4 2 2 2-2
2 1 4 1 4-1
1 2
SQL> -
ANSI Standard Join with Nested Table
Does anyone know how to (or whether you actually can) use ansi standard table joins with nested tables.
Non-ansi standard would look something like this
SELECT e.empno
FROM departments d, TABLE(d.employees) e
WHERE d.deptno = 10;
Where d.employees is a nested table.
But if I try ansi-standard I like such:
SELECT e.empno
FROM departments d
JOIN TABLE(d.employees) e
WHERE d.deptno = 10;
I get
ORA-00905: missing keyword
because I have nothing to join it on.
Your help is very much appreciatedBoth replies worked fine.
I think I will go with the NATURAL JOIN as it seems the cleanest option.
Thanks Guru 2748 -
HT204266 how can I update my app with another account?
how can I update my app with another account?
kambiz.fakhr wrote:
how can I update my app with another account?
Anything Downloaded with a Particular Apple ID is tied to that Apple ID and Cannot be Merged or Transferred to a Different Apple ID
Apple ID FAQs > http://support.apple.com/kb/HT5622 -
Case statement resulting into Left outer join with other tables
Hi All ,
I am facing a stuation where a Case statement on one of the logical columns in Answers is resulting into a left outer join with a table in the query.
If we remove the case stmt, the table is not being acessed.
The case stmt is a simple one and no other logical column is being accessed in the case stmt.
Please advice .
Thanks.Hi Sai,
No ..we dont have any left outer join ...its just that I am selecting measure from F1 which has a confimred dimension D1 with F2.Now when I dont have case stmt on measure from F1(Case stmt is something like : CASE WHEN "- P table"."P Column" = 'Y' THEN 'Right' ELSE 'Wrong' END), then it doesnt query F2.
However as soon as I introduce the case stmt ,the query creates a left outer join with F2.
Thanks. -
Avoid duplicates when i join with bridge table
i have a requirement with many to many relations between fact and dimention,that is the reason we have created bridge tables in the database.
if i execute only query on the fact table it is giving correct results.when ever i join with bridge tables it is returning lot of duplicate records.
Ex:
select amount from fact where column = 'xyz'
100
then it is returing one record.(this value is correct)
when ever i join this fact table with bridge table then it is returning duplicate records.
select a.amount from fact inner join bridge table b on a.fk=b.fk
100
100
100
100
100
how many number of fk's associated that many 100's are generating
in this case it is returning duplicate records.
in the RPD i have joined like one to many between fact to dimention.
if anybody face this type of situation please let me know how to resolve this?(FYI...i would have to do this before BM..because lot of other thing are coming into picture on BMM that's why i should have to achieve this in either physical or in database.
Thanks in advance
Edited by: user12077461 on Apr 3, 2011 6:39 PM
Edited by: user12077461 on Apr 17, 2011 4:51 PMI understand what you say but partially.. please explain in more detail how to do that;
How should look the adrese_nezonate block, then? I have to add a 'name' column and set copy value from item property to 'STREETS.NAME', and database_property No?
Then the post-query trigger how should look like (the order by clause)? The post-query sends the entire query (with where/order by clauses) to the server, but in that "select... where... order by" (built dynamically) there are only columns from that block (adrese_nezonate). I need to join with streets, INSIDE that query.
Thanks. -
Copy the structure of a table to another with another table name.
how to copy the structure of a table to another with another table name.
ie. i want a emp table with same values/structure to be copied to another table called my_employee.
how can this be done?create table my_emp as select * from emp;
If you do not want the data to be copied then do the following:
create table my_emp as select * from emp
where 1=2;
Avanti. -
Where clause with XMLExists and join on another table
Hi,
We have table like:
drop table xml_tbl;
create table xml_tbl (
xml_msg_id integer,
xml_msg_text xmltype
insert into xml_tbl values
(1, '<main><id>1</id></main>') ;
insert into xml_tbl values --(xml_msg_id,xml_msg_text)
(1, '<main><id>2</id></main>') ;
Another table like:
create Table Table1
( id1 int);
Insert into Table1 values(2);
Insert into Table1 values(3);
We need to have a view on top of the table xml_tbl where /main/id should have only those values which are in id1 column of table Table1.
Something like
CREATE OR REPLACE VIEW V_xml_tbl
xml_msg_text
AS
SELECT T.xml_msg_text
FROM xml_tbl T
WHERE XMLEXISTS (
'declare namespace Namesp1 ="Abc:Set";
let $Results as xs:boolean := fn:exists($p/main/id in (Select id1 from Table1)) --Now here I know I can't do Select id1 from
Table1*
return if ($Results ) then true() else ()'
PASSING T.xml_msg_text AS "p");
Actually in the real scenario Table1 will have many IDs and xml_tbl has many XML files..
So I am stuck on how to do it. Please help.
Thanks..
Edited by: user8941550 on Nov 20, 2012 7:19 PMOne of these two :
SQL> select t.xml_msg_text
2 from xml_tbl t
3 where exists (
4 select null
5 from table1 t1
6 where t1.id1 = xmlcast(
7 xmlquery('/main/id' passing t.xml_msg_text returning content)
8 as integer
9 )
10 );
XML_MSG_TEXT
<main>
<id>2</id>
</main>
SQL> select t.xml_msg_text
2 from xml_tbl t
3 , xmltable('/main' passing t.xml_msg_text
4 columns id integer path 'id'
5 ) x
6 where exists (
7 select null
8 from table1 t1
9 where t1.id1 = x.id
10 );
XML_MSG_TEXT
<main>
<id>2</id>
</main>
And a third one, using XMLExists :
SQL> select t.xml_msg_text
2 from xml_tbl t
3 where xmlexists (
4 'fn:collection("oradb:/DEV/TABLE1")/ROW[ID1=$d/main/id]'
5 passing t.xml_msg_text as "d"
6 );
XML_MSG_TEXT
<main>
<id>2</id>
</main>
Execution Plan
Plan hash value: 3633580934
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 2 | 116 | 8 (0)| 00:00:01 |
|* 1 | FILTER | | | | | |
| 2 | TABLE ACCESS FULL | XML_TBL | 2 | 116 | 3 (0)| 00:00:01 |
| 3 | NESTED LOOPS | | 1 | 5 | 5 (0)| 00:00:01 |
| 4 | TABLE ACCESS FULL| TABLE1 | 2 | 6 | 3 (0)| 00:00:01 |
|* 5 | XPATH EVALUATION | | | | | |
Predicate Information (identified by operation id):
1 - filter( EXISTS (SELECT 0 FROM "DEV"."TABLE1"
"SYS_ORAVW_2",XPATHTABLE('/main/id' PASSING :B1 COLUMNS "C_00$" XMLTYPE
PATH '.', "C_01$" XQEXVAL CHAR PATH '.') "P" WHERE
TO_BINARY_DOUBLE("ID1")=TO_BINARY_DOUBLE("P"."C_01$")))
5 - filter(TO_BINARY_DOUBLE("ID1")=TO_BINARY_DOUBLE("P"."C_01$"))The plan is similar to that of the second query above (XMLTable/EXISTS).
Still using XMLExists, a plan similar to the first query (EXISTS/XMLCast/XMLQuery) can be achieved by casting id to an integer datatype :
SQL> select t.xml_msg_text
2 from xml_tbl t
3 where xmlexists (
4 'fn:collection("oradb:/DEV/TABLE1")/ROW[ID1=xs:int($d/main/id)]'
5 passing t.xml_msg_text as "d"
6 );
XML_MSG_TEXT
<main>
<id>2</id>
</main>
Execution Plan
Plan hash value: 1149640166
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 61 | 7 (15)| 00:00:01 |
|* 1 | HASH JOIN SEMI | | 1 | 61 | 7 (15)| 00:00:01 |
| 2 | TABLE ACCESS FULL| XML_TBL | 2 | 116 | 3 (0)| 00:00:01 |
| 3 | TABLE ACCESS FULL| TABLE1 | 2 | 6 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - access("ID1"=SYS_XQ_ATOMCNVCHK(TO_NUMBER(SYS_XQ_UPKXML2SQL(SYS_XQ
EXVAL(SYS_XQEXTRACT(SYS_MAKEXML(0,"T"."SYS_NC00003$"),'/main/id'),1,50,3
3792,8192),50,1,0)),2,37))
Note
- Unoptimized XML construct detected (enable XMLOptimizationCheck for more information)Check each one on your real scenario to see which show best performance.
(I would tend to say the ones involving streaming evaluation)
Edited by: odie_63 on 5 nov. 2012 12:24
Edited by: odie_63 on 5 nov. 2012 12:38 -
Right way to preserve all parent table entries in a join with many tables!!
This problem is quite interesting to me. I have asked this question to others but no body is able to provide me with proper answers.
The problem is: How do I join a huge parent table with many child tables (more than 5 child tables) preserving all of the parent table entries. Lets say there is the parent table parentTable and three child tables childTable1, childTable2, childTable3. In order to get the data after joining these tables the query that I have been using was:
select parent.field1, parent.field2, parent.field3, child1.field4, child1.field5, child2.field6, child3.field7 from ParentTable parent, childTable1 child1, childTable1 child2, childTable3 child3 where parent.fielda = child1.fieldb and parent.fieldc = child.fieldd and parent.fielde = child.fieldf.
Although the tables are huge (more than 100,000 entries), this query is very fast, however those parent table entries which do not have child entries are lost. I know that I can left join a parent table with a child table and then with the next child table and then with the next child table and continue. Isn't there a simple solution for this commonly happening problem?
Please provide suggestions please...Hello Lakshmi,
Although I do not know exactly how to achieve what you want to achieve but I have seen DBAs/ABAPers in my experience can run queries/scripts using the COUNT function to give the actual number of line items per table for all your 100 or odd tables.
Rgds
CONMJI -
Message mapping problem: BAPI with range table parameters
A kind hello to all,
I try to call the BAPI_ALM_ORDERHEAD_GET_LIST in a 4.70 system via RFC connector. The configuration already works with another BAPI. With this here I get message mapping exception:
Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Zielelement /ns1:BAPI_ALM_ORDERHEAD_GET_LIST kann nicht angelegt werden. Prüfen Sie, ob die XML-Instanz für die Ausgangs-XSD und die Zielfeldzuordnung die Anforderungen der Ziel-XSD erfüllt. at com.sap.aii.mappingtool.tf3.AMappingProgram.start
(How can I switch the trace language to English easily? I try to translate:
"BAPI_ALM_ORDERHEAD_GET_LIST cannot be created. Check if the XML instance meets the requirements for the output XSD and the destination field mapping meets the requirements of the destination XSD.")
But the mapping test tool in the Integration Builder Design does not report any warning or error.
My guess is that the problem lies in the parameter structure of the BAPI_ALM_ORDERHEAD_GET_LIST: I have to fill the IT_RANGES selection range table, so it looks as if I need several instances of the item in the corresponding XML. Can I use "Duplicate tree" in the mapping editor? Here I got another exception?
Many thanks for any help!
Regards,
CarstenHi Udo,
you gave the final hint, indeed I used a XML file that was not evidently not compliant to the message type I created (even though it had been validated by Altova XMLspy).
From now onwards I only use the "Create instance" function of the test tool to create the XML body of my test messages...
Thanks a lot,
and best regards,
Carsten -
Records getting multiplied by a factor of 3 when joining with other table
When i query a table association_1 records for a particular network element i get 7 records
but join it with rtts_association table to get the rtts_no i m getting 21 records.....
the problems is ... 7 records are getting multiplied by a factor of 3 resulting in 21 records ....
how can i avoid these extra records that appear in the second query
SQL> select raised,cleared from association_1 where ne ='30434000/1MU';
RAISED CLEARED
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15
12-FEB-2011 06:27:18 12-FEB-2011 06:29:51
21-FEB-2011 21:36:44 22-FEB-2011 10:23:06
23-FEB-2011 01:08:44 23-FEB-2011 06:56:53
23-FEB-2011 17:06:16 23-FEB-2011 19:55:19
23-FEB-2011 20:37:22 23-FEB-2011 23:01:21
24-FEB-2011 00:33:17 24-FEB-2011 02:03:26
SQL> select a.raised,a.cleared,b.rtts from association_1 a, rtts_association b where a.ne=b.ne and a.ne='30434000/1MU';
RAISED CLEARED RTTS
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15 1490980
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15 1487697
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15 1487649
12-FEB-2011 06:27:18 12-FEB-2011 06:29:51 1490980
12-FEB-2011 06:27:18 12-FEB-2011 06:29:51 1487697
12-FEB-2011 06:27:18 12-FEB-2011 06:29:51 1487649
21-FEB-2011 21:36:44 22-FEB-2011 10:23:06 1490980
21-FEB-2011 21:36:44 22-FEB-2011 10:23:06 1487697
21-FEB-2011 21:36:44 22-FEB-2011 10:23:06 1487649
23-FEB-2011 01:08:44 23-FEB-2011 06:56:53 1490980
23-FEB-2011 01:08:44 23-FEB-2011 06:56:53 1487697
RAISED CLEARED RTTS
23-FEB-2011 01:08:44 23-FEB-2011 06:56:53 1487649
23-FEB-2011 17:06:16 23-FEB-2011 19:55:19 1490980
23-FEB-2011 17:06:16 23-FEB-2011 19:55:19 1487697
23-FEB-2011 17:06:16 23-FEB-2011 19:55:19 1487649
23-FEB-2011 20:37:22 23-FEB-2011 23:01:21 1490980
23-FEB-2011 20:37:22 23-FEB-2011 23:01:21 1487697
23-FEB-2011 20:37:22 23-FEB-2011 23:01:21 1487649
24-FEB-2011 00:33:17 24-FEB-2011 02:03:26 1490980
24-FEB-2011 00:33:17 24-FEB-2011 02:03:26 1487697
24-FEB-2011 00:33:17 24-FEB-2011 02:03:26 1487649
21 rows selected.For every combination of raised & cleared columns in "association_1" table, there are 3 records in the "rtts_association" table with different values for "RTTS" as below:
Association_1:
RAISED CLEARED
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15
rtts_association
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15 1490980
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15 1487697
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15 1487649Hence, evidently you wil get 7 (association_1) * 3 (rtts_association) in your output. If you want only one record in the output, you may need to pick any one of the values of RTTS from the 3 different values based on a pre-defined condition (e.g. record corresponding to lowest or highest value of RTTS)
Cheers -- -
Self join with fact table in Obie 10G
I am a newbie to obiee.I have a development requirement as follows-
I need to find supervisors designation with the existing star RPD design. explanation is below
DIM_Designation(Desig_Wid)
|(Row_wid)
|
DIM_EMPLOYEE--------WORKER_FACT------------DIM_Supervisor
(Row_Wid)-----------------(Employee_Wid)
(Supervisor_Wid)------------(Row_Wid)
3 dimension is joined to fact to get employee, his supervisor and designation of employee. now i want to get the supervisor's designation? how is it possible? already employee and supervisor dimension is same W_employee_d table joined with fact as alias DIM_EMPLOYEE and DIM_SUPERVISOR. how to do self join with fact to get supervisor's designation. i do not have any supervisor_desig_wid in fact table. any help is deeply appreciated.Yes,Duplicate the fact table create a primary key on the newly fact table alias dimension table.So you can ur data modelling as usual.
Maybe you are looking for
-
Excel service and OWA - getting ERROR while trying to open/edit Excel documents
Hi All, We have configured SharePoint 2013 with Excel Service and OWA (Office Web Apps). After configuring, we are able to view/edit Word or PowerPoint documents from the browser (as OWA is configured). But we are getting errors while trying to open/
-
Please forgive a newbie question. I own Acrobat v7 with LiveCycle but before I invest a lot of time learning how to create forms, I wonder if what I want to do is even feasible with LiveCycle. I want to design forms and distribute them to users. Thos
-
Importing fixed width text from a .txt file
I am really struggling to do in Numbers '09 something which I can do easily in Excel. I have a txt file containing plain text in fixed-width columns which I would like to import into numbers. I just cannot find a way to do it. I have tried using the
-
Making Requester Mandatory in PO Distributions
Hi, We have a requirement to make the Requester field mandatory in the PO Distribution screen. I used forms personalization to make the required property of that field to True. But, when i create a new PO, PO line and save it, it does not validate th
-
Update required to this script
Hi, This is a script to relink images by changing the names of the files in a folder etc. I am using Indesign CS4 and I would appreciate a update of this script to CS4 (previously worked in CS3) it still works in CS4 but not 100%. Could you also inco