Multiple outer joins from a single table
Here is my scenario - I have 3 folders:
Theater - contains Theater Name and Theater ID
Agency - contains Agency Name and Theater ID
Depot - contains Depot Name and Theater ID
A theater may or may not have an agency. Likewise, it may or may not have a depot.
Thus, I've set up a join from Theater (master) to Agency on Theater ID, and selected "outer join on detail"
Likewise, I've done the same between Theater (master) and Depot on Theater ID
When I attempt to create a report with the columns Theater Name, Agency Name, and Depot Name, I am unable to do so. I can only pick either Agency Name or Depot Name, not both. When I try to add the second outer joined element, Discoverer reports that it cannot determine the join configuration because "more than 1 of the detail folders uses non-aggregate items"
What am I doing wrong? Any help would be greatly appreciated, thanks!
Hi,
Try change the joins to be "outer join on detail" and "one to one join relationship between master and detail".
Hope that helps,
Rod West
Similar Messages
-
Is it Possible to make a join from a single table
Hi all,
Is it Possible to make a join from a single table
Suppose HR_ALL_ORGANIZATION_UNITS table
can we make a join in the following way
HR_ALL_ORGANIZATION_UNITS.ORGANIZATION_ID =HR_ALL_ORGANIZATION_UNITS.BUSINESS_GROUP_ID
Thanks in advanceHi
Yes you can join,
Like below =- it is called self join -
Slect a.oersson_id,a.employee_numebr, b.full_name
form
hr_all_organization_units a,
hr_all_organization_units b
where
a.person_id = b.person_id and
sysdate between a.effective_start_date and a.effective_end_date and
sysdate between b.effective_start_date and b.effective_end_date
914618 wrote:
Hi all,
Is it Possible to make a join from a single table
Suppose HR_ALL_ORGANIZATION_UNITS table
can we make a join in the following way
HR_ALL_ORGANIZATION_UNITS.ORGANIZATION_ID =HR_ALL_ORGANIZATION_UNITS.BUSINESS_GROUP_ID
Thanks in advance -
Query with multiple outer joins
I had a doubt with whether the following kind of query is valid with multiple outer-joins. The format of the query is something like this:-
select A.col1, B.col2
from table1 A, table2 B, table3 C where
A.col3=B.col4(+) and B.col5=C.col6(+)
This would mean the follwoing with regard to outer-joins in the query.
1) fetch records with col3 in table A matching or not matching col4 in table B
2) fetch records with col5 in table B matching or not matching col6 in table C
So, this query is valid?
I hope, my question is clear.
Please, help in solving the doubt.
regardsThis is valid and it works fine
-
Multiple 'logical joins' between a fact table and one dimension table
It appears that one cannot create multiple ‘logical joins’ between a fact table and one dimension table in OBIEE using the Oracle BI Administration Tool. For example, considering a Business Model with a dimension table TIMES and a fact table FACT containing START_TIME and END_TIME, we would like to create separate logical joins from FACT to TIMES for the START_TIMEs and END_TIMEs? Obviously, the underlying foreign keys can be created, but as far as I can tell the Oracle BI Administration Tool doesn’t support this. The workaround would be to replicate the TIMES table, but that’s ugly.
I seek an alternative approach.Try this. Create an two aliases for the TIMES dimension (Start & End) in the Physical Layer and then remove foreign key to the "Parent" Times dimension. Create the Foreign Key in the Physical Layer to the new aliases and then create the complex joins in the BMM Layer to the new aliases as well. This will allow you to present both dates within the same table in the Presentation Layer. Not the most elegant solution but it works.
-
Multiple Outer join in ORACLE 8.1.6
Hi ,
Can anybody suggest me how can i use multiple outer join on one table. I'm using ORACLE 8.1.6.
I know this version of oracle doesnt support this. But is there anmy other wa\y I can achieve this.
Thanks amd Regards
DeependraTricky question - but I went through this about 3 months ago, and found a good thread on here that explains it pretty well.
check out Re: Outer join a table with two diff table
You basically will have to create an inline view with one outer join in there, and then a second outer join on the outside. Read through the posts in that thread and it should help! -
Getting last year column value from a single table
I am having the following columns in my table
BRANCH_CD
YYMM
VNDR#
VGROUP#
SALES_TRGT_AMT
SALES_ACTL_AMT
CUM_TRGT_AMT
CUM_ACTL_AMT
i need to get sales_actl_amt from this year and sales_actl_amt from last year from a single table
pls help
thank you
Edited by: 960991 on Nov 19, 2012 11:13 PMHi ashish,
but i can't use unions in my reports.
once view my query :
select t.branch_cd,b.branch_e_name,t.vndr#,v.vndr_name,
sum(nvl(t.sales_actl_amt,0)) sales_actl_amt
from inv_sales_trgt_val t,branches b,vendor v where
t.branch_cd=b.branch_cd and
t.vndr#=v.vndr# and
(t.yymm between :fiscal_month and :fiscal_month2) and
(:fiscal_month<>trunc(:fiscal_month2,-2)) and :fiscal_month2<>trunc(:fiscal_month2,-2)) and t.branch_cd between :from_branch and to_branch and
t.vndr# between :from_vndr and :to_vndr
group by t.vndr#,v.vndr_name,t.branch_cd,b.branch_e_name
order by t.vndr#,t.branch_cd;
how can i get last year sales_actl_amt . -
Calling multiple script logics from a single package
Team- How do i call multiple script logics from a single DM package...?
I know its possible and have seen a prototype but cant recollect or find it on sdn...
Thanks for your time.
Vishal.Hi,
You can create a master script logic which will include all the other script logics using the *INCLUDE command and call this master script through your DM package.
Another way is to have multiple tasks in the process chain which is calling a script logic. You can pass separate script logics to each of the tasks.
I would prefer the first option
Hope this helps. -
Generate multiple idoc's from the single application doc(Sales order)
Hi All,
Iam working on a requirement where i have to generate multiple idoc's from a single sales order based on sales org, division on header data and plant at item level, if somebody please let me know how to proceed with this requirement.
Thanks
KashifHi,
You can create a Z-program and call Function Module <b>MASTER_IDOC_DISTRIBUTE</b>.
You can make a call to this FM to send the Idoc as many times as u have plants in your Sales Order.
You can call FM <b>IDOC_OUTPUT_ORDRSP</b> to fill the IDoc structure.
Then u can keep the materials of only that plant for which u want to pass on the information.
Thanks,
Utsah Garg. -
Extract Multiple Rows from a Single Table into a Single Row in a New Table
I have a table in a database that contains contact data like name, address, phone number, etc.
The folks who designed the database and wrote the application wrote it so that all contact records are placed in that table, regardless of contact type. In fact, the contacts table does not even have a column for "type" even though there are many
different types of contacts present in that table.
I am trying to write a mail merge style report in SRSS, that gets sent to a specific type of contact, based on criteria provided that must be obtained from another table, and that data is then used to get back to a specific set of contacts from the contacts
table.
The attached file directly below describes my problem and all related information in an extremely detailed way.
SRSSMailMergeIssue.pdf
Unless there is a way to make a SRSS Tablix point to two different data sets in SRSS, it looks like I have to combine multiple rows from the same table into a new table.
If anyone can review the details in the attached pdf file and possibly point me in the direction I need to run to solve this probelm, I would greatly appreciate it.
I also included a document (below) that shows the tables I reference in the probelm description.
dbtables.pdfI found a solution.... and posted it below
select
dk.ucm_docketnumber [UCM DocketNumber],
dk.ucm_docketid [UCM DocketID],
vc.FirstName [Victim FirstName],
vc.MiddleName [Victim MiddleName],
vc.LastName [Victim LastName],
vc.Suffix [Victim Suffix],
vc.Address1_Line1 [Victim AddressLine1],
vc.Address1_Line2 [Victim AddressLine2],
vc.Address1_Line3 [Victim AddressLine3],
vc.Address1_City [Victim City],
vc.Address1_StateOrProvince [Victim StateProvince],
vc.Address1_PostalCode [Victim Postalcode],
oc.FirstName [Offender FirstName],
oc.MiddleName [Offender MiddleName],
oc.LastName [Offender LastName],
oc.Suffix [Offender Suffix],
oc.Address1_Line1 [Offender AddressLine1],
oc.Address1_Line2 [Offender AddressLine2],
oc.Address1_Line3 [Offender AddressLine3],
oc.Address1_City [Offender City],
oc.Address1_StateOrProvince [Offender StateProvince],
oc.Address1_PostalCode [Offender Postalcode],
pc.FirstName [Arresting Officer FirstName],
pc.MiddleName [Arresting Officer MiddleName],
pc.LastName [Arresting Officer LastName],
pc.Address1_Line1 [Arresting Officer AddressLine1],
pc.Address1_Line2 [Arresting Officer AddressLine2],
pc.Address1_Line3 [Arresting Officer AddressLine3],
pc.Address1_City [Arresting Officer City],
pc.Address1_StateOrProvince [Arresting Officer StateProvince],
pc.Address1_PostalCode [Arresting Officer Postalcode]
FROM ucm_docket dk
left outer join ucm_victim v on dk.ucm_docketid = v.ucm_docketnumber
left outer join contact vc on vc.contactid = v.ucm_victimlookup
left outer join ucm_offender o on o.ucm_offenderid = dk.ucm_offenderlookup
left outer join contact oc on oc.contactid = o.ucm_individualid
left outer join contact pc on pc.contactid = dk.ucm_ArrestingOfficerLookup
WHERE (dk.ucm_docketnumber = @DocketNUM) -
Provisioning multiple AD Groups from a Single Privilege
Experts,
We're encountering a situation here when we provision to multiple Active Directory groups from a single IDM Role.
The scenario is this:
We have a workflow that has multiple conditional and switch tasks that result in the provisioning of users to Active Directory 2008 (mixed mode) Our workflow uses the provisioning framework and all users have been granted the ONLY privilege for the system.
The workflow will result in adding the users to multiple AD groups sometimes two AD groups that are associated with a single IDM role. The first assignment always works, the second does simply does not occur, no entry in the system or job log although IDM does show that the role has been assigned with an 'OK' status.
We've accomplished a workaround by redesigning the workflow so that only single roles are assigned at a time and using chain result OK links to move from one provisioning activity to another, but frankly, we are unsatisfied with this. IDM should be handling this much better through
I'm wondering if we have a pending value floating out there and we should just be applying the pending value at the end of every AD group add.
Any thoughts on this would be appreciated.
Thanks,
MattMatt,
In your post you mention "I'm wondering if we have a pending value floating out there and we should just be applying the pending value at the end of every AD group add"... I'm faced with a similar issue were I'm left pending values for privileges after the group is assigned.
I've imported the AD groups as privileges. I assign them without issue. But when I review the assignments I can see that each corresponding privilege assignment now has a pending value. I can not remove the privilege from the user at this point.
Have you seen this before? Any suggestions on how I can clean this up. BTW, I'm using the SAP PF basically unchanged...
Thanks! -
Multiple foreign keys to a single table
Hi,
I need to write an SQL sentence to bring a unique row formed from multiple foreign keys which are dependent on the same table. The two tables as follow:
CREATE TABLE UNIDADMEDIDA (
IDUNIDADMEDIDA NUMERIC(3) NOT NULL,
DESCRIPCION VARCHAR2(128) NOT NULL,
CONSTRAINT PKUM PRIMARY KEY(IDUNIDADMEDIDA)
CREATE TABLE TRANSPORTE (
IDBOLETA NUMERIC(12) NOT NULL,
CORRELAVEHICULO NUMERIC(2) NOT NULL,
TIPOVEHICULO NUMERIC(1),
TIPOGASOLINA NUMERIC(1),
CANTIDAD NUMERIC(8),
RECORRIDOPROMEDIO NUMERIC(10,2),
IDUMRECORRIDO NUMERIC(3),
CONSUMOPROMEDIO NUMERIC(10,2),
IDUMCONSUMOPROM NUMERIC(3),
CONSUMOTOTALANUAL NUMERIC(10,2),
IDUMCONSUMOTOT NUMERIC(3),
CONSTRAINT PKTRANSPORT PRIMARY KEY(IDBOLETA, CORRELAVEHICULO),
CONSTRAINT FKUMRECORRI FOREIGN KEY(IDUMRECORRIDO) REFERENCES UNIDADMEDIDA(IDUNIDADMEDIDA),
CONSTRAINT FKUMCONSUMO FOREIGN KEY(IDUMCONSUMOPROM) REFERENCES UNIDADMEDIDA(IDUNIDADMEDIDA),
CONSTRAINT FKUMCONSTOT FOREIGN KEY(IDUMCONSUMOTOT) REFERENCES UNIDADMEDIDA(IDUNIDADMEDIDA)
The columns IDUMRECORRIDO, IDUMCONSUMOPROM and IDUMCONSUMOTOT depend on the table UNIDADMEDIDA (specifically from the IDUNIDADMEDIDA field). I need to bring back the description (DESCRIPCION field) from the different values stored in TRANSPORTE table.
Thanks for your help!!!
MarioWelcome to the forum!
Have you thought about joining against the parent table three times to pick up each different description?
SELECT <COLUMN LIST>
, UNI_A.DESCRIPCION
, UNI_B.DESCRIPCION
, UNI_C.DESCRIPCION
FROM TRANSPORTE
JOIN UNIDADMEDIDA UNI_A ON UNI_A.IDUNIDADMEDIDA = TRANPORTE.IDUMRECORRIDO
JOIN UNIDADMEDIDA UNI_B ON UNI_B.IDUNIDADMEDIDA = TRANPORTE.IDUMCONSUMOPROM
JOIN UNIDADMEDIDA UNI_C ON UNI_C.IDUNIDADMEDIDA = TRANPORTE.IDUMCONSUMOTOT
;It is always helpful to provide the following:
1. Oracle version (SELECT * FROM V$VERSION)
2. Sample data in the form of CREATE / INSERT statements.
3. Expected output
4. Explanation of expected output (A.K.A. "business logic")
5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.
You provided #2 partially. If you provide the rest we may be able to help you even further. -
How to use multiple outer join in ODI
SELECT
Count(*)
FROM
student S,
department D,
course C
WHERE
D.S_Name=S.S_Name
AND D.Dept_Name = C.Dept_Name (+)
and S.C_Name =C.C_Name (+)
And (D.Dept_ID = 1);
I run this query. I got an ORA-01417 error.In topology change the join option to Ordered ISO
then rewrite your query with ANSI syntax.
SELECT
Count(*)
FROM
student S join department D on D.S_Name=S.S_Name,
student S right outer join course C on S.C_Name =C.C_Name,
department D right outer join course C on S.C_Name =C.C_Name
where
(D.Dept_ID = 1);
First verify the code in sql client befor implementing it in ODI
Thanks,
Sutirtha -
Executing multiple sql statements from a single sql file
Hi, I am Vijay Krishna.
I want to drop user, drop tablespace, create tablespace and create user from a single executable file or a single sql file. The command should be in sequence. How can we achieve it? Can I anybody help me in this regard. I want this as soon as possible. It's urgent. Kindly post a reply.
Also, how can we know the oracle home directory from a java program? The problem is we should know the Oracle home directory and use it for creating the tablespace. In the userinterface we will give just for a new database user creation. I will be really thankfull if anybody can help me in this regard.It is showing any error messages.
I will diplay the entire batch file which we are using.
sqlplus / as sysdba
drop user examination cascade;
drop tablespace examination;
create tablespace examination
datafile 'C:\oracle\product\10.1.0\oradata\orcl\examination.dbf'
size 500M autoextend on;
create user examination identified by examination
default tablespace examination
quota unlimited on examination;
grant connect, resource to examination;
exit;
when i run the batch file from the DOS prompt it is entering into the sql prompt and coming out in a fraction of a second. We are just seeing a screen coming and going. But no error messages are being displayed.
first we thought that as we are giving the create tablespace and create user in the same file we created another file and tried without having the create commands. Even then the user didn't get dropped. -
Multiple clob fields in a single table
Are there any known performance issues associated with having 4 CLOB fields in a single table... the table as such will be relatively small.. like 100 MB... with most rows being << 50k.
Not really. If you need 4 CLOB columns and it makes sense to have alll the columns in a single table, go for it.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Creation of Multiple billing documents from a Single sales order
Hi Experts,
How can we create many billing documents from a Single sales order.
Will it be possible we create a Sales order with bigger quantity and then keep on creating partial billing documents based on the billing quantities and dates.
Request you all for a solution.
Thanks
MonteeHi ,
1. If Qty is one number - based on value of the order - it is possible to create different billing doc.'s based on billing date and value using billing plan , again these are periodic billing or milestone billing
2. Using Contract process- create material /qty contract- release partial qty by creating release document and create billing document w.r.t to contract or release document (sales order)
thanks
Chidambaram
Maybe you are looking for
-
Whenever I am using Firefox mobile - either regular, beta or aurora and go to search for something like through the Google search page and attempt to search for something the search bar does nothing and hitting the enter button instead doesn't do any
-
Error While Deploying EPMA Essbase Application
Dear All, I have one app Essbase in EMPA and when I try deploy it does not work. \\Shared member [MEMBER] precedes its prototype. (1060053): Outline has errors This member is in my profile below the member store. -> A -> A1 Store -> B -> A1 Sha
-
Adding "Sending company code" to Transaction FCHN
Hi, We would like to add a column "Sending company code" to the report out of transaction FCHN. The info for this column is present in REGUH-ABSBU. Is there anyway this could be done without copying the standard program into a custom program and modi
-
HT2478 Suddenly my screen went large, unable to access right of screen
My screen went too large, unable to access left of screen
-
Hi, I have joined a company which has a legacy 10.2.0.4 RAC on windows. They did not have anyone to manage and now i am in. I recommended them to upgrade to the certified version, but they do not want it as it will be decommissioned. Now we have to c