ODI 11 g multiple table with union join
Hi all
I have a problem with joining 4 different tables and union all of them.
Here I want to generate this query;
Select * from
Table1, table2
Join table2 = table1
Union of all the
Select * from
Table 3, table 4
Join table3 = table 4
But I have not the same column that all the table, some are missing. When I write one - PL/SQL query I can easily add a false "NULL column1' column, but I can not how I do with ODI 11 g.
I tried not to use "Active Mapping", but it does not work.
I'm newbie ODI 11 g
Thank you
Myra
Hi, Myra,.
I'd even as in PL/SQL. In your table target add all the columns you need and overall data whatever you're missing some columns just put NULL in the mapping.
Thank you
Ajay
Tags: Business Intelligence
Similar Questions
-
Showing and hiding of multiple tables with a drop-down list
I'm doing a drop-down list so that users can select the number of tables that are shown/generated when they specify the tables how they need to complete (there is 1 table for each day of a multi = day, maximum of 5).
I thought I would use a similar javascript than I used in another place on the form that has been applied to radio buttons to show or hide a specific table. When I applied that to the drop down and added more than lines that the scipt was ineffective, with some play that I managed to do the work, but now it seems thre is a question with which value is selected in the list. When a user selects a certain value, it shows the previous value (so when I chose 4 days, which has a hairy '3', the message box for the test proposed, I added told me I selected the value '2').
I wonder if there is an easier way to do the function, what I'm doing, or if the drop down menu is the best solution? The maximum number of tables that can be filled is 5, then the drop down menu appears as a way ideal for resticting than for the person filling out the form.
This is an example of writing, that I joined the drop-down list, as an action of "change." It is repeated 4 times for each value.
Form1. Page2.DropDownList1::change - (JavaScript, client)
If (this.value == '2') {}
Form1. Page2.TableDay1.presence = "visible";
Form1. Page2.TableDay2.presence = "visible";
Form1. Page2.TableDay3.presence = 'hidden ';
Form1. Page3.TableDay4.presence = 'hidden ';
Form1. Page3.TableDay5.presence = 'hidden ';
}
else {}
Form1. Page2.TableDay1.presence = 'hidden ';
Form1. Page2.TableDay2.presence = 'hidden ';
Form1. Page2.TableDay3.presence = 'hidden ';
Form1. Page3.TableDay4.presence = 'hidden ';
Form1. Page3.TableDay5.presence = 'hidden ';
}
If (this.value == '3') {}
Form1. Page2.TableDay1.presence = "visible";
Form1. Page2.TableDay2.presence = "visible";
Form1. Page2.TableDay3.presence = "visible";
Form1. Page3.TableDay4.presence = 'hidden ';
Form1. Page3.TableDay5.presence = 'hidden ';
}
else {}
Form1. Page2.TableDay1.presence = 'hidden ';
Form1. Page2.TableDay2.presence = 'hidden ';
Form1. Page2.TableDay3.presence = 'hidden ';
Form1. Page3.TableDay4.presence = 'hidden ';
Form1. Page3.TableDay5.presence = 'hidden ';
}
I looked at it and tried a few different things and my colleague who is much better than me with sciprting is also at a loss for now - he is unfamiliar with LiveCycle, unless I have so any help is appreciated. Thanks a lot once again as my last number (the script for radio buttons) has been resolved here. Thanks again.
The question that you see with the value being off is due to the fact that you use the change event. The change event is triggered * before * the new value is assigned to the field. This event is commonly used for intercpet changes. If you wish to continue using the change event, you can get the new value with:
xfa.event.newText;
This, however, will get the text that is displayed instead of the value behind. No doubt, you can consult the nodes in the drop-down list to see what value, but I think you should just avoid all of this by adding your code to the layout event: each subform hideable... loan for example, for the first, in the case of TableDay2 layout_ready (as the day1 should never be hidden, as I understand it) put :
This.Presence = (DropDownList1.rawValue > = 1)? "visible": "hidden";
TableDay3 would be:
This.Presence = (DropDownList1.rawValue > = 2)? "visible": "hidden";
etc.
Let me know if it helps.
-Scott
-
How to create multiple tables with SQL commands
Hi, first of all, is it possible to create a table and then one more both with SQL commands?
because I tried to do this in the following way
Example:
CREATE TABLE 'HB_Product')
"productId" number 4 NOT NULL.
"productName" VARCHAR2 (20) NOT NULL,
"prodPricePerTon" NUMBER (10,2).
"HB_Product_PK" PRIMARY KEY CONSTRAINT ("productId")
)
/
CREATE TABLE 'HB_Operations')
"orderNo" NUMBER (5) NOT NULL,
'lineNo' number 4 NOT NULL.
"billNo" NUMBER (10) NOT NULL,
'actions' VARCHAR2 (15).
'place' VARCHAR2 (15).
"actDate" DATE NOT NULL,
"totWeight" NUMBER (6.3).
'HB_Operations_PK' CONSTRAINT PRIMARY KEY ('lineNo')
)
/
I copied some of the syntax for creating the table object browser, but I preffer to use my own sql.
It gives me an error "Missing or option not valid."
Can someone explain to me how to do it properly, or why it is not possible?
Best regards from Stan!862377 wrote:
so you're saying I can't do several tables at the same time?Yes... Well,... not this way
You can do this way
create schema authorization alex CREATE TABLE "HB_Product" ( "productId" NUMBER(4) NOT NULL, "productName" VARCHAR2(20) NOT NULL, "prodPricePerTon" NUMBER(10,2), CONSTRAINT "HB_Product_PK" PRIMARY KEY ("productId") ) CREATE TABLE "HB_Operations" ( "orderNo" NUMBER(5) NOT NULL, "lineNo" NUMBER(4) NOT NULL, "billNo" NUMBER(10) NOT NULL, "actions" VARCHAR2(15), "place" VARCHAR2(15), "actDate" DATE NOT NULL, "totWeight" NUMBER(6,3), CONSTRAINT "HB_Operations_PK" PRIMARY KEY ("lineNo") ) /
The question is: why do you want to create "at the same time? What is the harm in creating one after the other?
some tips (maybe not desired):
do not use quotation marks in your statement, this will create column names and the table out. -
Multiple tables with the same field name
Hi, I have a query that pulls a field named 'Total' from 20 different tables (week1 - semaine20). When I try to view the results as #Week1.Total #, for example, I get an error saying that Total is not defined in week1. I also tried totalHours.Week1.Total (totalHours is the name of my request), but get the same thing - Week1.Total is not defined in totalHours. Help, please! Thank you!Alias your colunms...
SELECT
request.ID, request. FirstName, request. LastName,
Request.SEM, request.year, request.banner,
Week1.id AS wk1_ID, Week1.Total AS wk1_total,
Week2.id AS wk2_ID, Week2.Total AS wk2_total,
Week3.id AS wk3_ID, Week3.Total AS wk3_total,
Week4.id AS wk4_ID AS Week4.Total wk4_total...
... etc.They will now have different names in the output. (The table name prefix that is used in your query on each column is never displayed in the output.)
Phil
-
Gears - error when you try to insert values into a table with multiple columns
Hello
I started playing with the gears and SQlLite today and I get an error when I try to insert values into a table with multiple columns.
I have:
var db = google.gears.factory.create('beta.database'); db.open('developerSet'); db.execute('create table if not exists Developers (DeveloperName text, DeveloperAge int)'); var devName = "Davy" var devAge = 32; try { db.execute('insert into Developers values (?, ?)', [devName, devAge]); alert('success'); } catch (e) { alert(e); }
I get the error:
net.rim.device.api.database.DatabaseException; insert into developers values (?,?): SQL logic error or missing database.
I use this reference: http://code.google.com/apis/gears/api_database.html
Everything works if I have only one field as:
var db = google.gears.factory.create('beta.database'); db.open('developerSet'); db.execute('create table if not exists Developers (DeveloperName text)'); var devName = "Davy" var devAge = 32; try { db.execute('insert into Developers values (?)', [devName]); alert('success'); } catch (e) { alert(e); }
I use the plug-in Visual Studio 2.0 for 2008 that are running Windows XP SP and Simulator 2.13.0.56
Thank you
Davy
Yes, a SQLite database will persist between battery pulls. The database is registered either to internal MEM or removable media (not the device memory), depending on which is available on your device.
In general, its not considered a best practice to remove your table as soon as it is empty and re - create it again when you want to add data. This adds extra overhead fresh for the final, delete and insert first for a given table. Instead, define and finalize your drawing before you create your table. Once created, review the static schema.
That being said, for development purposes, it may be easier to provide an easy way to drop your tables while you develop your schema.
See you soon,.
Adam
-
Use with need to collect in bulk to insert records from multiple tables
Hello
I plsql record type with several tables with multiple columns. so when I used bulk collect with education for ALL. I want to insert records in multiple tables.
Please give me suggestions.
ForAll is designed to be used with a single DML statement, which may include dynamic SQL statements. However, I do not know what advantage this will give you your list iteration save several times, one for each table - especially since there is an air show with SQL dynamic.
Example 1 (dynamic SQL):
begin
...
forall i in vRecList.First..vRecList.Last
execute immediate '
begin
insert into Table1 (Col1, Col2, Col3) values (:1, :2, :3);
insert into Table2 (Col1, Col2, Col3) values (:1, :2, :3);
end;' using vRecList(i).Col1, vRecList(i).Col2, vRecList(i).Col3;
end;Another approach that I should work (but not tested) is using to insert all the Scriptures and based record inserts, but you need to try on your version of Oracle forall has changed between the versions. In this case vRecList must be compatible with the Table % ROWTYPE and Table2% ROWTYPE type.
Example 2 (insert all):
begin
...
forall i in vRecList.First..vRecList.Last
insert all
into Table1 values vRecList(i)
into Table2 values vRecList(i)
select 1 from dual;
end; -
Multiple Table join result problem
Hello
I am new to oracle
I am facing a problem to the exact result of multiple table.
My query is
Select e . e_name, t . Start_date, a. area_name , t . Branch of the , t . objective, ( t. actual_rtn_dt - t . Start_date) duration
t of tour_info zone a, e method
where actual_rtn_dt is not null
and t. emp_code = e. emp_code
and t. zone = a. Area_Code
order t. start_date;
-----------------------------------------------------------------
Here is the result
MD. KHAIRUL ISLAM 01 SEP-14 DHAKA_3 071 AUTOMATION 6 DEV SUDORSON 02-SEP-14 TRAINING DIISP 2 JUSTINE DIA 04 SEP-14 GAZIPUR HUMAN RESOURCES REVIEW 0 SABRI AL RAHMAN 04 SEP-14 DHAKA_3 071 AUTOMATION WITH PKSF 3 MD. KHALEDUL ISLAM 04 SEP-14 GAZIPUR HUMAN RESOURCES REVIEW 0 GAZI MD. SALAHUDDIN 04 SEP-14 GAZIPUR 0 MD. KHALEDUL ISLAM 06 SEP-14 071 AUTOMATION 0 MD. JULIEE RAHMAN 14-SEPT-11 GAZIPUR TRAINING 2 But I want to, in Bracnh column allows to extract branch_name Bracnh Tbal (I have on the database) as Area_name.
How is it Possible?
Thanks advanced
SELECT e.e_name, t.start_date, a.area_name, --t.branch, (select branch_name from branch_tbl where
=t.branch) branch_name, t.objective, ( t.actual_rtn_dt - t.start_date ) duration FROM tour_info t, area a, emp_info e WHERE actual_rtn_dt IS NOT NULL AND t.emp_code = e.emp_code AND t.area = a.area_code(+) ORDER BY t.start_date; Is that what you are looking for?
-
RICs when MergeTable using with the names of multiple tables
Hello world!
I just saw, as v11 OWM MergeTable media with the names of multiple tables. As I couldn't find anything in the documentation, here's a question:
It also means, that RICs are automatically taken into account regarding the order of INSERTS/CHANGES/DELETES?
That would actually really great and simplify the merge of our application mechanism a lot.
Kind regards
Andreas
Hi Andreas,
This feature works the same MergeWorkspace, but with a smaller set of tables. Tables will always be merged into the order of the child table first, then the parent tables. However, foreign key constraints are not validated until all tables have been merged. This would prevent a mistake to be triggered when the child table merging before the parent merging table data in the parent workspace.
Kind regards
Ben
-
How to join this per_rating_levels this table with query table.
Dear all,
Guide how 2 join me per_rating_levels this table with query because, I want 2 see the per_rating_levels.name against all employees.
When I join this table with query it shows several recording/cortion against this record.
Query:
SELECT
PAPF.full_name employee_name,
papf1.full_name supervisor_name,
WOMEN'S WEAR. Employee_number,
hr_general.decode_job (PAAF.job_id) job_name,
Department of hr_general.decode_organization (PAAF.organization_id),
PC.Name, PCE.Comments EmployeeComments,
(by selecting pce1.comments in per_competence_elements pce1
where
PCE.assessment_id = pce1.assessment_id
AND pce.competence_id = pce1.competence_id
AND pce1.object_id = pce.object_id) ManagerComments;
--(sélectionnez rtl.name dans rtl où les pc.) RATING_SCALE_ID = rtl. Name RATING_SCALE_ID)
OF per_all_people_f women's wear.
per_all_people_f papf1,
per_all_assignments_f ADP,
PA per_appraisals,
pat per_appraisal_templates,
per_assessments not,
per_competence_elements pce,
per_competences pc
WHERE papf.person_id = paaf.person_id
AND paaf.supervisor_id = papf1.person_id
AND paaf.primary_flag = 'Y '.
AND pa.appraisee_person_id = papf.person_id
AND pa.appraisal_template_id = pat.appraisal_template_id
AND pa.appraisal_id = pas.appraisal_id
AND pat.assessment_type_id = pas.assessment_type_id
AND pas.assessment_id = pce.assessment_id
AND pce.object_id = papf.person_id
AND pce.competence_id = pc.competence_id
AND trunc (sysdate) BETWEEN papf.effective_start_date AND papf.effective_end_date
AND trunc (sysdate) BETWEEN papf1.effective_start_date AND papf1.effective_end_date
AND trunc (sysdate) BETWEEN paaf.effective_start_date AND paaf.effective_end_date
- AND papf.employee_number =: p_employee_number
- AND pa.appraisal_date =: p_appraisal_date
- AND papf.business_group_id =: p_bg_id
order of papf.employee_number
Concerninguser10941925 wrote:
Dear all,Guide how 2 join me per_rating_levels this table with query because, I want 2 see the per_rating_levels.name against all employees.
When I join this table with query it shows several recording/cortion against this record.'2' in your question means "to"? If so please do not use text instant message in this forum.
Now I suppose that PRE_RATING_LEVELS is a table in your application. And you are trying to include this table in an existing query. But in doing so, you have found the Cartesian product, correct?
In fact, how do you think someone a public forum without any knowledge of your table and data structure could help you?
Lets see, here's your query. I formatted.
select papf.full_name employee_name , papf1.full_name supervisor_name , papf.employee_number employee_number , hr_general.decode_job(paaf.job_id) job_name , hr_general.decode_organization(paaf.organization_id) department , pc.name name , pce.comments employeecomments , ( select pce1.comments from per_competence_elements pce1 where pce.assessment_id = pce1.assessment_id and pce.competence_id = pce1.competence_id and pce1.object_id = pce.object_id ) managercomments from per_all_people_f papf , per_all_people_f papf1 , per_all_assignments_f paaf , per_appraisals pa , per_appraisal_templates pat , per_assessments pas , per_competence_elements pce , per_competences pc where papf.person_id = paaf.person_id and paaf.supervisor_id = papf1.person_id and paaf.primary_flag = 'Y' and pa.appraisee_person_id = papf.person_id and pa.appraisal_template_id = pat.appraisal_template_id and pa.appraisal_id = pas.appraisal_id and pat.assessment_type_id = pas.assessment_type_id and pas.assessment_id = pce.assessment_id and pce.object_id = papf.person_id and pce.competence_id = pc.competence_id and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date and trunc(sysdate) between papf1.effective_start_date and papf1.effective_end_date and trunc(sysdate) between paaf.effective_start_date and paaf.effective_end_date order by papf.employee_number
Now, you want to add the PRE_RATING_LEVELS in the list so that you can use the column NAME.
First thing you need to do is to determine the relationship between PRE_RATING_LEVELS and other tables. A relationship can be
1. one on one
2 one-to-many
3. - to-severalSo when you tried to join, your state of health has resulted in 2nd or 3rd type of relationship. If you arrive with someone who knows the business and the data and find the table that could uniquely identify a line of PRE_RATING_LEVELS.
-
BAD RESULTS WITH OUTER JOINS AND TABLES WITH A CHECK CONSTRAINT
HII All,
Could any such a me when we encounter this bug? Please help me with a simple example so that I can search for them in my PB.
Bug:-8447623
Bug / / Desc: BAD RESULTS WITH OUTER JOINS AND TABLES WITH a CHECK CONSTRAINT
I ran the outer joins with check queries constraint 11G 11.1.0.7.0 and 10 g 2, but the result is the same. Need to know the scenario where I will face this bug of your experts and people who have already experienced this bug.
Version: -.
SQL> select * from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production PL/SQL Release 11.1.0.7.0 - Production CORE 11.1.0.7.0 Production TNS for Solaris: Version 11.1.0.7.0 - Production NLSRTL Version 11.1.0.7.0 - Production
Why do you not use the description of the bug test case in Metalink (we obviously can't post it here because it would violate the copyright of Metalink)? Your test case is not a candidate for the elimination of the join, so he did not have the bug.
Have you really read the description of the bug in Metalink rather than just looking at the title of the bug? The bug itself is quite clear that a query plan that involves the elimination of the join is a necessary condition. The title of bug nothing will never tell the whole story.
If you try to work through a few tens of thousands of bugs in 11.1.0.7, of which many are not published, trying to determine whether your application would be affected by the bug? Wouldn't be order of magnitude easier to upgrade the application to 11.1.0.7 in a test environment and test the application to see what, if anything, breaks? Understand that the vast majority of the problems that people experience during an upgrade are not the result of bugs - they are the result of changes in behaviour documented as changes in query plans. And among those who encounter bugs, a relatively large fraction of the new variety. Even if you have completed the Herculean task of verifying each bug on your code base, which would not significantly easier upgrade. In addition, at the time wherever you actually performed this analysis, Oracle reportedly released 3 or 4 new versions.
And at this stage would be unwise to consider an upgrade to 11.2?
Justin
-
Declare a type of table with multiple columns
I have a table with a column of type, and I want to create one with two columns.
My type is:
create or replace type "NUMBER_TABLE" in the table of the number;
And I use it in function:
FUNCTION GetValues()
return NUMBER_TABLE
as
results NUMBER_TABLE: = NUMBER_TABLE();
Start
Select OrderId bulk collect in: results from (select * from tbl_orders);
-Other code...
end;
I want select it be like this:
Select OrderId, OrderAddress bulk collect into: results from (select * from tbl_orders);
How to do this?Is that what you are looking for:
CREATE OR REPLACE TYPE two_col_rec AS OBJECT (empno NUMBER, ename VARCHAR2(10)) / CREATE OR REPLACE TYPE two_col_table AS TABLE OF two_col; / CREATE OR REPLACE FUNCTION GetValues RETURN two_col_table AS results two_col_table := two_col_table(); BEGIN SELECT two_col(empno, ename) BULK COLLECT INTO results FROM emp; -- RETURN results; END; / show errors
-
can bind us a single external table with multiple files in OWB 11 g?
Hello
I wanted to ask if it is possible to link an external table with several source files in same or different places? Or an external table must be bound to a single source file and one place.
Thanks in advance,
Ann.
Published by: Ann on October 8, 2010 09:38Hello Ann,.
Can you please help me by telling me the steps to achieve this.
Right-click on the external table in the project tree, from the menu choose Configure.
then open right clock the node data files dialog Configuration properties and choose from the menu - Create
you will get a new record for the file - name of file data propertyAlso the link of the OWB user guide
http://download.Oracle.com/docs/CD/B28359_01/OWB.111/b31278/ref_def_flatfiles.htm#i1126304Kind regards
Oleg -
DB update multiple records in a table with a form
I'm developing an online proofing system that displays a number of images and then allow the client to approve each image, but also to comment.
I currently have a configuration table with the different elements (an image dynamically takes its name, details about the image and the required form fields). See this Image for layout
I would then apply a repeat region (the number of signs vary) and you want to update all records with feedback from the customer and approval with a single form. How this is done? I downloaded a trial of the Toolbox for developers, but the documentation is horrible. I'd be willing to buy an extension that will allow, as appropriate.
I found an extension that does this in two minutes:
http://www.WebAssist.com/Professional/products/ProductDetails.asp?pid=117
Great software, highly recommended. Easy to figure out and got this "problem" solved quickly.
-
Joining tables with the aggregate function
I have 4 tables and I joined and I got my output variables. Joiner_1
I have another table and I used joiner_1 fields to match this table and had joiner_2. Then, I used aggregator on joiner_2 to get the sum and max values.
I traced all my outputs of the target of joiner_1 table. and 2 fields I got in Joiner_2 I have them at home to the target table, but it gives me error saying:
API8003: The attributes of the connection target group is already connected to a source of incompatible data. Use Carpenter or fixed operator to join the data upstream first before plugging it in this operator.
How to do this.
Basically, what I'm trying to do is.
example my target table has 10 fields
I get 8 fields by adhering to a set of tables, 2 other fields I need to get another table by matching the two my first join of output fields.
If my first join returns 8 rows for each row, it returns I could have several lines in the table of another that I need to get the money and put it in my table of objectives for the other 2 fields. My target table should be 8 rows after this is all done.
If I join my table another one at my first joints I get more lines.
Thanks in advance.Hello
Try this,
After the 4th Carpenter, I assume you have all three fields in there.
Add to your aggregator it and use a fith Carpenter and join the 4th and fifth Carpenter
you would have all three fields and the field of the aggregator
Then try to complete the objective.
If this does not work please let me know.
Published by: Dinesh.Sharma on June 8, 2009 09:31
Published by: Dinesh.Sharma on June 8, 2009 09:32
-
To create an interactive report in the apex by selecting from multiple tables
Hi, I am creating an interactive report by selecting from multiple tables.
SELECT w.FIRST_NAME as name, w.SURNAME as name, i.ROAD Road, i.DATE_OF_INC as DATE_OF_INC, S.STATEMENT as a STATEMENT OF Declaration
JOIN THE
WITNESS w
ON w.witness_id = s.FK1_WITNESS_ID
JOIN THE
Incident I have
WE
i.incident_no = w.FK1_INCIDENT_NO
JOIN THE
user_station ps
ON ps.station_id = i.nearest_station_id
JOIN THE
the user in.
WE
in. STATION_ID = ps.station_id
WHERE po.officer_id = 1
by I continue to encounter this error "the report query requires a unique key to identify each row. The supplied key cannot be used for this query. Please change the report attributes to define a unique key column. "ORA-01445: cannot select ROWID from where sample, a join without key preserved table view '
So I googled around and found that in the attibutres tables report, I need to change the "LINK" COLUMN so first, I changed "Link to custom target", but the report is so I changed it to "Exclude link Clolumn" again, the report didn't report and I STILL got a blank page with only the tabs.
I wonder you can not create a report by selecting from multiple tables?
If you can please I need your help.
Thank you
You can, but in this case, it might be easier to build your report tables that are joined Oracle views and then build your report out of the newly built sight...
Or wrap a selection around your selection with joins, and then make the where clause on the external selection...
Thank you
Tony Miller
Software LuvMuffin
Ruckersville, WILL
Maybe you are looking for
-
I'm on Win7 64 bit. Initially, I uninstalled because a program has changed my page of the new tab to something unwanted and I literally had no way to change this back. Now, every time I reinstall, I get the error "cannot load the profile, it may be m
-
Hi, I'm looking to change my username, I use mac, I'm single again and I would love to make use of my family name again.
-
Satellite A200 - 23Q - can I wear while it is running?
Hey guys!Another question. While I'm working on my computer I usually move there addicted my apartment, carry it vertically, during execution, wheather it's a video or converting, playing music... Can this damage my HARD drive? My brother has an old
-
BOUZHAM-LVG appearing since the gateway updated for Netgear engineering
We have an N450 (on the side, he also says CG300Dv2) Our gateway software must have auto update for Netgear genius. All of a sudden we see BOUZHAM-LVG appearin gin our network. In Netgear ReadyShare genius he shows as a USB device as possible. Who di
-
I have disabled all media, selected uninstall several applications, I deleted as much as I can, and again, it will not move to the new iOS. I have an iPad 16 GB Mini iOS 9.1 trying to pass to 9.2. The iPad will not synchronize until the iOS is update