Problem with outer join/insert
I created a test case in scott schema that describes my problem. I use emp table, and I want to have one more table - emp_info - that will store some additional info about employees. Not every employee will have additional info. I can't add a field to emp table - this has to be in an additional table.
I want to display all the emp's in a swing table, and an info if it exists - of course, using outer join. Further more, I want users to be able to enter info in this same table. If info already exists in the emp_info it will be updated, if not a new record is created.
I hope you get the picture.
So, emp_info table is:
create table emp_info(empno number(4), info varchar2(10))
ALTER TABLE "SCOTT"."EMP_INFO"
ADD (CONSTRAINT "PK_EMP_INFO" PRIMARY KEY("EMPNO"))
ALTER TABLE "SCOTT"."EMP_INFO"
ADD (CONSTRAINT "FK_EMP_INFO_EMP" FOREIGN KEY("EMPNO")
REFERENCES "SCOTT"."EMP"("EMPNO"))
In Jdev I create entitiy objects for emp and emp_info, and create View object 'ViewOuter' using these two entities. emp is updatable and empinfo is updatable and reference.
SQL query for the view object is:
SELECT Emp.EMPNO, Emp.ENAME, Emp.JOB, Emp.MGR, Emp.HIREDATE,
Emp.SAL, Emp.COMM, Emp.DEPTNO, EmpInfo.EMPNO AS EMPNO1,
EmpInfo.INFO
FROM EMP Emp, EMP_INFO EmpInfo
WHERE Emp.EMPNO = EmpInfo.EMPNO(+)
I changed View row class of the ViewOuter view:
public void setInfo(String value) {
if (getEmpno1()==null) {
setEmpno1(getEmpno());
setAttributeInternal(INFO, value);
Now I create the table in swing. It works fine - if a user changes info, new record is created or existing updated etc. There is only one problem:
If I change info on an employee, and then requery the view without commiting to the database, I don't see this info. If I try to change it, I get error
(oracle.jbo.TooManyObjectsException) JBO-25013: Too many objects match the primary key oracle.jbo.Key[7499 ].
It seams that the new info is cached, but requerying the view didn't pick it up. And when it creates new row for info PK is violated.
How can I avoid this?
I set up the primari key for emp_info like this:
public void setInfo(String value) {
if (getEmpno1()==null) {
setEmpno1(getEmpno());
setAttributeInternal(INFO, value);
It's set when the user enters info.
What is the difference between transaction.commit and transaction.postChanges?
Posting changes looks like good temp solution. How can I change view object, so it calls postchanges before executing query? Since I can do requery on multiple places in application, this should be handled by the view itself.
Is there any better way?
Similar Messages
-
Problem with outer join with filter on join column
Hi,
In physical layer I have one dimension and two facts, and there's an outer join between the facts.
dim_DATE ,
fact_1 ,
fact_2
Joins:
dim_DATE inner join fact_1 on dim_DATE.DATE = fact_1.DATE
fact_1 left outer join fact_2 on fact_1.DATE = fact_2.DATE and fact_1.SOME_ID = fact_2.SOME_ID
When I run a report with a date as a filter, OBIEE executes "optimized" physical SQL:
select fact1.X, fact2.Y
from
Fact_1 left outer join on fact_1.DATE = fact_2.DATE and fact_1.SOME_ID = fact_2.SOME_ID
where Fact_1.DATE = TO_DATE('2009-05-28' , 'YYYY-MM-DD' )
and Fact_2.DATE = TO_DATE('2009-05-28' , 'YYYY-MM-DD')
The filter on Fact_2.DATE effectively replaces outer join with inner.
Is there a way to disable this "optimization", which is actually very good for inner joins, but doesn't allow outer joins?
Thanks in advance,
Alex
Edited by: AM_1 on Aug 11, 2009 8:20 AMIf you want to perform a Fact-based partitioning with OBIEE (two fact with the same dimension), you have to :
* create in your physical layer for each fact table the joins with the dimension
* create in the Business Model layer ONE star schema with ONE logical fact table containing the columns of your two physical fact table
In this way when you choose minimal one column of your fact1 and one column of your fact2, OBIEE will perform two query against each fact table/dimension, join them with an OUTER JOIN and your problem will disappear.
Cheers
Nico -
Problem with outer joins and the class indicator/discriminator
Hello,
I am having a problem defining a query in toplink (10.1.3.3).
In the workbench, I have created a parent and 2 child descriptors. The parent is "AbstractValue", the children are "DefaultValue", classified by the discriminator 'DEF', and "OverrideValue", classified by 'OVR', both located in the same table.
Another descriptor (containing a one-on-one mapping to both a "DefaultValue", and a "OverrideValue") needs to be queried for its 'value'.
The way the query should act is: If an override value (row) exists, this one applies for that object. If an override doesn't exist, return the default value.
The query then comes down to (as I have it now):
builder.getAllowingNull("OverrideValue").getAllowingNull("value").ifNull(builder.get("DefaultValue").get("value")).equal(builder.getParameter(VALUE_PARAM));
The problem is that toplink adds the distinction for the different kind of "values" in the where clause WITHOUT checking for null values e.g. it performs an outer join, but then still checks for the discriminator value thus
....t1.ovr_id = t2.id(+) AND t2.discriminator = 'OVR' AND ...
instead of
... LEFT JOIN values t2 ON (t1.ovr_id = t2.id AND t2.discriminator = 'OVR') ...
This leads to the behaviour that the query returns ONLY the objects that have override and default values.
An overview of the queries (simplified)
Toplink, at the moment, returns only results if both override and default values exists:
SELECT t1.id
t1.def_id,
t1.ovr_id
FROM values t2,
parameter t1,
values t0
WHERE nvl(t2.value, t0.value) = 15 AND
t1.ovr_id = t2.id(+) AND t2.discriminator = 'OVR' AND
t1.def_id = t0.id AND t0.discriminator = 'DEF'
Situation Wanted:
SELECT t1.id
t1.def_id,
t1.ovr_id
FROM parameter t1
LEFT JOIN values t2 ON (t1.ovr_id = t2.id AND t2.discriminator = 'OVR')
JOIN values t0 ON (t1.def_id = t0.id AND t0.discriminator = 'DEF')
WHERE nvl(t2.value, t0.value) = 15
Anyone know if there is some statement I am missing to allow an actual outer join on descriptors containing class indicators/discriminators? A possible rewrite?
Thanks in advance,
RudyThis is a bug in TopLink's outer join support for Oracle. Currently the outer join is put in the where clause, instead of the from clause, as we do on other platforms. You might be able to fix it by changing your OraclePlatform to return false for shouldPrintOuterJoinInWhereClause().
Please log this bug on EclipseLink, or through Oracle technial support.
There is a workaround using,
descriptor.getInhertiancePolicy().setAlwaysUseOuterJoinForClassType(true);
James : http://www.eclipselink.org -
Tables
Normal EMP TABLE and dept TABLE
query
SELECT e.deptno,d.dname
FROM emp e , dept d
WHERE E.DEPTNO(+)=D.DEPTNO
AND (e.deptno=20 or e.job='CLERK')
question
When i use the above query i cannot get the extra records from dept table( 40 , OPERATIONS) due to a condition
as long as it is "OR" we cannot use outer joins.
Regardless of that condition i need to get that record(40,OPERATION)
Please reply me it is very urgent for my work now..
regards
Boopathiselect e.deptno,d.dname
FROM emp e , dept d
WHERE E.DEPTNO(+)=D.DEPTNO
AND (e.deptno=20 or e.job='CLERK')
This will only fetch the record for 20, IF you want for deptno 40 then you should remove your AND clause (AND (e.deptno=20 or e.job='CLERK'))
select * from dept
===========
DNAME DEPTNO
OPERATION 20
FINANCE 40
TRADE 22
select * from emp
===========
ENAME DEPTNO JOB
a 20 CLERK
b 22 XXX
select e.deptno,d.dname
FROM emp e , dept d
WHERE e.DEPTNO(+)=d.DEPTNO
=======================
DEPTNO DNAME
20 OPERATION
22 TRADE
FINANCE--- This is the one which does not ahve a record in emp but is there in dept hence it has been returned -
Group by sum doesn't work with outer join. Can anyone please help me to get it right?
I've posted some sample data and queries below:
CREATE TABLE COMPLAINT
CNO NUMBER,
REASON VARCHAR2(15 BYTE),
TOTAL NUMBER
Insert into COMPLAINT
(CNO, REASON, TOTAL)
Values
(1, 'edge', 250);
Insert into COMPLAINT
(CNO, REASON, TOTAL)
Values
(2, 'edge', 250);
Insert into COMPLAINT
(CNO, REASON, TOTAL)
Values
(3, 'brst', 300);
Insert into COMPLAINT
(CNO, REASON, TOTAL)
Values
(4, 'crea', 400);
COMMIT;
CREATE TABLE SCOTT.COMPLAINTROLL
CNO NUMBER,
ROLL VARCHAR2(15 BYTE)
SET DEFINE OFF;
Insert into COMPLAINTROLL
(CNO, ROLL)
Values
(2, 'roll22');
Insert into COMPLAINTROLL
(CNO, ROLL)
Values
(1, 'roll4');
Insert into COMPLAINTROLL
(CNO, ROLL)
Values
(1, 'roll3');
Insert into COMPLAINTROLL
(CNO, ROLL)
Values
(1, 'roll2');
Insert into COMPLAINTROLL
(CNO, ROLL)
Values
(1, 'roll1');
COMMIT;
select * from complaint
CNO REASON TOTAL
1 edge 250
2 edge 250
3 brst 300
4 crea 400
select * from complaintroll
CNO ROLL
1 roll1
1 roll2
1 roll3
1 roll4
2 roll22
-- total of reason code edge is 500
select reason,sum(total)
from complaint c
group by reason
REASON SUM(TOTAL)
brst 300
crea 400
edge 500
-- total of reason code edge after outer join is 1250
select reason,sum(total)
from complaint c,complaintroll cr
where c.cno=cr.cno(+)
group by reason
REASON SUM(TOTAL)
brst 300
crea 400
edge 1250
{\code}
Thanks for reading this post.The problem that you described is simple. The outer join duplicates all the rows from the parent table (complaint). If you want to sum a column from the parent table, then this sum includes all the duplicated rows.
There are several solutions for this problem.
A) One had been shown already by Cenutil. Instead of doing an outer join, you can do a subquery in the select clause that delivers the additional information from the detail table.
SQL> select reason,
sum(total),
sum((select count(*) from complaintroll cr where c.cno=cr.cno)) cnt_rolls
from complaint c
group by c.reason;
REASON SUM(TOTAL) CNT_ROLLS
crea 400 0
brst 300 0
edge 500 5b) sum in two steps. First sum and count including the join criteria, then use this information to calculate the correct total sum.
SQL> select reason, sum(stotal), sum(stotal/scount), sum(scount), sum(cnt_rolls)
2 from (select reason, sum(total) stotal, count(*) scount, count(cr.cno) cnt_rolls
3 from complaint c
4 left join complaintroll cr on c.cno=cr.cno
5 group by reason, c.cno
6 )
7 group by reason;
REASON SUM(STOTAL) SUM(STOTAL/SCOUNT) SUM(SCOUNT) SUM(CNT_ROLLS)
crea 400 400 1 0
brst 300 300 1 0
edge 1250 500 5 5
sql> c) another option is to do the left join, but do the aggregation only one time for the parent table. Analytic functions are helpful for that. However since analytic fuinctions can't be used inside an aggregation function, we would again need an inline view.
SQL> select reason, sum(case when rn = 1 then total end) sum_total, count(*), count(crcno)
2 from (select row_number() over (partition by c.reason order by c.cno) rn,
3 c.*, cr.cno crcno
4 from complaint c
5 left join complaintroll cr on c.cno=cr.cno
6 )
7 group by reason;
REASON SUM_TOTAL COUNT(*) COUNT(CRCNO)
brst 300 1 0
crea 400 1 0
edge 250 5 5
SQL> Edited by: Sven W. on Feb 10, 2011 1:00 PM - formatting + column added to 2nd option -
3.2, BC4J, outer joins, insert, lookup, bug
I have a table voyage that has a foreign key to routes. This relation is not mandatory.
I created a frame that shows the voyage. I use an outer join to show the route name if there is a route
SELECT voyage.ID
,voyage.Name
, voyage.routeID
, route.ID
, route.Name
WHERE voyage.routeID = route.ID(+)
FROM voyage, route
This works fine for selecting rows. But when I insert a new voyage and try to commit it, I get an error message that route.ID is not allowed to be NULL.
Any suggestions?
TIAHello Folks!
I would like to bring this topic up again!
We have problems using view objects with outer joins, too.
In JDev 3.1 we finally managed to handle things a bit. All worked fine except of deleting a record! No chance here!
So we prayed for better behaviour in JDev 3.2.2. But as it seems it's getting even worse. I just checked our application.
Here are the results:
- In the Business Component Tester everything works fine. No errors.
- As generated business component data form in applet I can't insert a record. The joke is that deleting now is possible!!! The error I get is:
"AttributeInfo: cannot insert null into..". When I remove all AttributeInfos named by the error messages all works fine. But that's no solution cause we need these information!
thanks for any help on this.
null -
Update with Outer Join, round 2
Thanks for those of you who helped me out on the first one (I never thought that you could use a one-row SELECT like that).
However, here is a new version of my problem:
I have three tables.
Table_1 has a column that needs to be updated based on values in Table_2 and Table_3.
Both Table_1 and Table_2 have values used to determine which Table_3 row to use.
However, not every Table_1 row has a corresponding Table_3 row, in which case the Table_3 value to use is assumed to be 1.
The tables and corresponding columns are:
TABLE_1
value_1 - the value to be updated
key_2 - a pointer to TABLE_2
key_3a - a pointer to TABLE_3, or a dummy value if there is no corresponding TABLE_3 record
TABLE_2
key_2 - the primary key
key_3b - a secondary pointer to TABLE_3
value_2 - a value to be used in calculating TABLE_1.value_1
TABLE_3
key_3a - the first part of the unique key
ley_3b - the second part of the unique key
value_3 - a value to be used in calculating TABLE_1.value_1
If there is a row in table_3 that matches the table_1.key_3a and table_2.key_3b values (where table_2.key_2 = table_1.key_2):
set table_1.value_1 = table_2.value_2 * table_3.value_3
If there is no such row in table_3:
set table_1.value_1 = table_2.value_2
I want to do something like this:
UPDATE table_1 t1
SET value_1 =
SELECT t2.value_2 * NVL(t3.value_3, 1)
FROM table_2 t2
LEFT JOIN table_3 t3
ON (t3.key_3b = t2.key_3b and t3.key_3a = t1.key_3a)
WHERE t2.key_2 = t1.key_2
However, Oracle does not allow t1 to be referenced in the ON clause of the outer join.
(Assume that every key_2 value in table_1 is in table_2 as well - it is only the key_3 value that can be a dummy.)
If I move "t3.key_3 = t1.key_3" to the WHERE clause, then t1.value_1 is null for rows without the corresponding table_3 value.
I can do it with a clone of table_1 using ROWIDs:
UPDATE table_1 t1
SET value_1 =
SELECT t2.value_2 * NVL(t3.value_3, 1)
FROM table_1 t1a
JOIN table_2 t2
ON t2.key_2 = t1a.key_2
LEFT JOIN table_3 t3
ON (t3.key_3b = t2.key_3b and t3.key_3a = t1a.key_3a)
WHERE t1a.row_id = t1.row_id
However, is there an easier way to do this using ANSI joins (i.e. without (+) syntax)?
I have this feeling I am missing something reasonably obvious here.ddelgran wrote:
Thanks for those of you who helped me out on the first one (I never thought that you could use a one-row SELECT like that).
I want to do something like this:
UPDATE table_1 t1
SET value_1 =
SELECT t2.value_2 * NVL(t3.value_3, 1)
FROM table_2 t2
LEFT JOIN table_3 t3
ON (t3.key_3b = t2.key_3b and t3.key_3a = t1.key_3a)
WHERE t2.key_2 = t1.key_2
However, Oracle does not allow t1 to be referenced in the ON clause of the outer join.
(Assume that every key_2 value in table_1 is in table_2 as well - it is only the key_3 value that can be a dummy.)
If I move "t3.key_3 = t1.key_3" to the WHERE clause, then t1.value_1 is null for rows without the corresponding table_3 value.
I can do it with a clone of table_1 using ROWIDs:
UPDATE table_1 t1
SET value_1 =
SELECT t2.value_2 * NVL(t3.value_3, 1)
FROM table_1 t1a
JOIN table_2 t2
ON t2.key_2 = t1a.key_2
LEFT JOIN table_3 t3
ON (t3.key_3b = t2.key_3b and t3.key_3a = t1a.key_3a)
WHERE t1a.row_id = t1.row_id
However, is there an easier way to do this using ANSI joins (i.e. without (+) syntax)?
I have this feeling I am missing something reasonably obvious here.You might want to refer to my post in your original thread how to use join views in updates. You can use ANSI join syntax there, too:
Re: Update with Outer Join
You would end up with something like this (note: untested):
UPDATE
SELECT t1.value_1, t2.value_2 * NVL(t3.value_3, 1) as new_val
FROM table_1 t1
INNER JOIN table_2 t2 ON (t2.key_2 = t1.key_2)
LEFT JOIN table_3 t3
ON (t3.key_3b = t2.key_3b and t3.key_3a = t1.key_3a)
SET value_1 = new_val;And again the same restrictions regarding key-preserved tables apply as described in the post referred to.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
SQL7 to ORA9i problem w/ outer joins
The information provided for the new release 9.2.0.1.7 of the Migration workbench explained that outer joins would be easier to convert with the added parse options. I have several stored procedures with outer joins that are still giving warning errors with the latest version. I have selected the parse options to generate Oracle 8i outer joins and have also left it unchecked. I continue to get the same errors for the outer joins. Here is an example of the join:
(SELECT DISTINCT Product_tblProductRegion.ProductRegion_ID
FROM Product_tblProductRegion LEFT JOIN Product_tblMaster ON Product_tblProductRegion.ProductRegion_ProductID = Product_tblMaster.Product_ID
WHERE Product_tblMaster.Product_ID Is Null)
Please let me know what information is needed to work through this problems.
Thank you.Logged bug, Bug No: 3393782
The workaround is to manually copy the ANSI Outer join from the TSQL to PLSQL. There appears to be a conflict between two fixes in the code, the ANSI join fix and the table function code, which is applicable to sqlserver 2k.
Turloch -
I made a purchase with my debit card on The Simpson Tapped out game, And now my game won't open. It just kicks me out every time I click on it. How do I fix this problem with out deleting my app?
Personally, I would never use a debit card online, for security reasons. If your card gets hacked its your money that is stolen. At least with a credit card it is the card providers money that is stolen.
Anyway, I would delete the app and re-install. If you paid for the app in the first place you will be able to re-install free of charge. Also, the app should allow the in-app purchase to happen again as it should recognise that you have already purchased it previously.
Finally, it might be that the 3G doesnt have as much ram as more recent models of iphone and you may have applications running in the background that are preventing the app to function with the in-app purchase unless you shut down any apps eating all you memory that are running in the background. Shut-down these apps (and the simpson tap out app) by exiting to your home screen and double-tapping the home button to show what apps are running in the background. press and hold any of the open apps until it starts shaking. close all the apps down. exit then re-launch the app.
good luck. -
How to poll a blob using db adapter, with outer joins condition
Hi All,
We are trying to poll tables which contain column types as long and blob, we are using relationships in adapter and kept outer joins. by this we got select distinct t1.document .....etc
distinct keyword cannot be used for blobs.
is there any way to poll these tables having blob column types with outer joins.
thanks a lot in advance,
RRHi,
Procedure will be an explicit Invoke not Polling. If you can alter you design such that your BPEL process instead of polling gets triggered by some external entity (Java, PL/SQL, Scheduler, another BPEL etc.), you can put the data fetching logic in the procedure and call this procedure from your BPEL process to get the data. And your BPEL process is called periodically at an interval by an external entity.
Also see if you can restrict the duplicate records at the database level itself. Polling, AFAIK, is limited in terms of customization and wouldn't be easy to customize. However, would like to learn a way if someone has.
Regards,
Neeraj Sehgal -
Help requried with outer joins
Hi All,
I neeed a query help can any one please help me getting this done,
for the below query
select trunc(assumed_time_sql) AS date1,sum(rp.rebate_due)as sum1 from mn_date_dim dd ,mn_rebate_payment rp,mn_prc_program prc,mn_structured_doc sd
where trunc(assumed_time_sql) in (TO_DATE('01-JUL-10','dd-mon-yy'),add_months(TO_DATE('01-JUL-10','dd-mon-yy'),-3),add_months(TO_DATE('01-JUL-10','dd-mon-yy'),-6),add_months(TO_DATE('01-JUL-10','dd-mon-yy'),-9))----input parameter
AND trunc(dd.assumed_time_sql)=TRUNC(rp.start_date)
AND prc.prc_program_id=rp.tiered_rebate_id
AND sd.struct_doc_id=prc.struct_doc_id
AND sd.struct_doc_id_num='M0000763'----input parameter
group by trunc(assumed_time_sql);
I am getting output as
date1 sum1
01-JAN-10 10
01-APR-10 15
01-JUL-10 20
But i want my output to be as
date1 sum1
01-JAN-10 10
01-APR-10 15
01-JUL-10 20
01-OCT-09 NULL
I have tried with outer joins but this didn't help me
Can any one please give me help in getting this done
ThanksHi,
As SB pointed out, you'd better provide tables and data in order to be helped more efficiently.
Anyway, you may want to investigate the use of NVL and/or DECODE so that you can translate NULL into valid values so they are returned to your select statement.
HTH,
Thierry
Handle: p78
Status Level: Newbie (10)
Registered: Mar 9, 2009
Total Posts: 60
Total Questions: 35 (30 unresolved) Be kind to share your helpful / correct threads with other with marking them as ANSWERED
Edited by: Urgent-IT on Feb 13, 2011 11:00 AM -
Generate a where clause with outer join criteria condition: (+)=
Hi,
In my search page, I use Auto Customization Criteria mode, and I build where clause by using get Criteria():
public void initSrpQuery(Dictionary[] dic, String userName) {
int dicSize = dic.length;
StringBuffer whereClause = new StringBuffer(100);
Vector parameters = new Vector(5);
int clauseCount = 0;
int bindCount = 1;
for(int i=0; i < dicSize; i++){
String itemName = (String)(dic.get(OAViewObject.CRITERIA_ITEM_NAME));
Object value = dic[i].get(OAViewObject.CRITERIA_VALUE);
String joinCondition = (String)dic[i].get(OAViewObject.CRITERIA_JOIN_CONDITION);
String criteriaCondition = (String)dic[i].get(OAViewObject.CRITERIA_CONDITION);
String criteriaDataType = (String)dic[i].get(OAViewObject.CRITERIA_DATATYPE);
String viewAttributename = (String)dic[i].get(OAViewObject.CRITERIA_VIEW_ATTRIBUTE_NAME);
String columnName = findAttributeDef(viewAttributename).getColumnNameForQuery();
if((value != null) /*&& (!("".equals((String).trim())))*/){
if(clauseCount > 0){
whereClause.append(" AND ");
whereClause.append(columnName + " " + criteriaCondition + " :");
whereClause.append(++bindCount);
parameters.addElement(value);
clauseCount++;
If I want to generate following where clause:
select
,emp.name
,emp.email
,emp.salesrep_number
,comp.name
,gs.srp_goal_header_id
,gs.status_code
,gs.start_date
,gs.end_date
from g2c_goal_shr_emp_assignments_v emp
,jtf_rs_salesreps rs
,xxg2c_srp_goal_headers_all gs
,cn_comp_plans_all comp
where 1 = 1
and rs.salesrep_id = gs.salesrep_id (+)
and gs.comp_plan_id = comp.comp_plan_id (+)
and gs.period_year (+) = :1 -- :1 p_fiscal_year
How can I generate a where clause with outer join : gs.period_year (+) = :1 ? Will I get '(+)=' from get(OAViewObject.CRITERIA_CONDITION)?
thanks
LeiIf you are using SQL-Plus or Reports you can use lexical parameters like:
SELECT * FROM emp &condition;
When you run the query it will ask for value of condition and you can enter what every you want. Here is a really fun query:
SELECT &columns FROM &tables &condition;
But if you are using Forms. Then you have to change the condition by SET_BLOCK_PROPERTY.
Best of luck! -
Getting an error called Invalid relational Operator
SELECT DISTINCT t1.recv_order_no, t2.reference_no
FROM receiving_order t1, receiver_num t2
WHERE TRIM(t2.reference_no) (+) = TRIM (t1.recv_order_no)
ORDER BY t2.reference_no ASC
What I am doing wrong here ?
Can I use trim fun with outer join ?
Thanks for help.
SriniHi Srini,
I have done this with emp and dept
Following is an example:
1 select a.deptno, b.ename
2 from dept a, emp b
3* where trim(a.deptno) = trim(b.deptno(+))
scott>/
DEPTNO ENAME
10 CLARK
10 KING
10 GHULAM
10 MILLER
20 SMITH
20 ADAMS
20 FORD
20 SCOTT
20 JONES
30 ALLEN
30 BLAKE
30 MARTIN
30 JAMES
30 TURNER
30 WARD
40Hope this helps
Ghulam -
How to use common object from two tables with out join.
HI,
I have two tables called A & B In A table i have the following objects
1.weekend
2.S1(measure)
3.S2(measure)
4.S3(measure)
5.S4(measure)
And In B table i have followning columns
1.week end
2.p1(measure)
3.p2(measure)
4.p3(measure)
5.p4(measure)
Now in universe i created all the measure objects i.e.s1,s2,s3,s4,p1,p2,p3,p4 A.weekend,B.weekend.
instead of using week end two times i wnt to use only once because this is common in both table.
if i use join between these tables i am getting values fine
But With out join is there any thing to do in universe level to create common objects to use from both the tables..I tried using aggregate awareness but while reporting it is taking as two SQL.which is not synchronized.
Please help me on this ...hi,
Although Weekend column is present in both tables, by creating a single Object in Universe, Universe can identify relationship with only table referenced in Object Creation.
So, there will be no identification of relationship with other table measures.
Obviously, you need to create 2 Weekend objects in Universe (in two classes).
Case 1: You need not join these two tables in Universe. When you create 2 Queries in WEBI, automatcially Weekend objects are synchronized (if both are of same datatype)
Case 2: If you join these two tables in Universe, Obviously,
your SQL may contain Weekend from Table1, measures from Table 2
or
your SQL may contain Weekend from Table2, measures from Table 1
Finally, You need to create 2 objects in Universe. But your query may contain a single Object based on Case 2.
Regards,
Vamsee -
Problem with out going mail. I can send from my iPad but not my MacBook Air, yet settings are the same. Can anyone advise?
Hi sointoit,
If you are having issues sending mail from your MacBook Air, you may find the following article helpful:
OS X Mail: Troubleshooting sending and receiving email messages
http://support.apple.com/kb/TS3276
Cheers,
- Brenden
Maybe you are looking for
-
Rasterizing PDF to memory in Acrobat
I'm currently investigating how to rasterize PDF pages as image data to memory from an Acrobat Plugin. I found the PDPageDrawContentsToWindow() function and got that to work on Mac. But I have two problems with this approach: 1. I don't know what col
-
Preview in Firefox opens multiple tabs
Dreamweaver CS3 and Firefox 2 preview problem Start situation: No browsers open, then previewing page from DW and Firefox starts and shows the page correctly. Great. But then when Firefox is already running, previewing causes three new tabs to be ope
-
HELP-Why won't this function return a value
I want to get this XML data OUT of the function, but it just won't work. What I am doing wrong??? Tracing "xmlList" gives me the output i want IN the function, but if I can't get it OUT. If i set the function to "String", I still can't get the functi
-
Bring back the Z Series: Petition
In my book, the Z had stood for cool design and innovation! In a world where Thinkpads do not change much, the Z series had represented the sexy Thinkpad that had turned heads. I would love to have the polished titanium Thinkpad back on my desk! Leno
-
Is there having parameterize view in oracle?
Hi All, I wanted to make a parameterized view for filter the data. when I use that view I 'll pass the value and on that basis, that view will be filter the data. So My query is that, is there having such a view creation concept in oracle. If yes the