OWB Outer Join Error
I am working with OWB 10gR2. My source is Oracle 8i. My target db is 10g.
Here is the code in the joiner expression window:
APS_CUSTOMER.ID = APS_PROF_MEMBER.ID (+)
AND APS_CUSTOMER.SEGMENT_ID = APS_CUSTOMER_SEGMENT.SEGMENT_ID (+)
AND APS_CUSTOMER.ADDR_ID = APS_CUST_ADDR.ADDR_ID (+)
AND APS_CUSTOMER.ETHNICITY_ID = APS_ETHNICITY.ETHNICITY_ID (+)
AND APS_CUSTOMER.ID = APS_CUSTOMER_SPECIALTY.ID (+)
AND APS_CUSTOMER_SPECIALTY.SPECIALTY_ID = APS_SPECIALTY.SPECIALTY_ID (+)
AND APS_MEMBER_CLASSIFICATION.CLASSIFICATION_ID = APS_CLASSIFICATION.CLASSIFICATION_ID (+)
AND APS_CUSTOMER.ID = APS_MEMBER_CLASSIFICATION.ID (+)
AND APS_CUSTOMER.ID = DPS_USER_ROLES.USER_ID
AND DPS_USER_ROLES.ATG_ROLE = DPS_ROLE.ROLE_ID
AND DPS_USER_ROLES.ATG_ROLE = '1800003'
AND (APS_PROF_MEMBER.DEGREES IS NOT NULL OR
APS_MEMBER_CLASSIFICATION.CLASSIFICATION_ID IS NOT NULL OR
APS_CUSTOMER_SPECIALTY.SPECIALTY_ID IS NOT NULL)
I am getting the following error:
VLD-1512: Outer join marker(+) can only be applied to column names. It cannot be applied to more complex expressions.
I have tried to remove the last 4 rows of the join condition to no avail. Can someone please provide some guidance. Thanks.
Next problem. The mapping "works", but is not giving me the correct results.
I had previously written the query in TOAD and know the results are correct. The joiner code is almost exactly the same as the SQL query, but the input order is not the same as the table order in the query. Does the order of the input groups in the joiner matter that much? I think I remember reading that in the OWB help.
Thanks.
Similar Messages
-
OUTER JOIN -- Error: ORA-01417 (a table may be outer joined to at most one
Hi there,
I have a rather simple task: retrieve all the records in a table, for agiven domain p_domain_id (input parameter). The problem is that there are about 6 FKs in the table, and I need the names (strings) corresponding to those FKs (from other tables). Unfortunately, some of the FKs are NULL, so in '=' I loose records. Without the last 2 lines in WHERE clause, I get the correct result. With d2 in place (and without the "(+)" ) I loose 2 records. With the d3 (and also without "(+)"), I do not get any record.
With the "(+)", the code compiles but I get the run time error ORA-01417
NOTE: I put the "+" within parentheses, in order to show it like a text in this editor.
What's an elegant solution to this?
Thanks a lot.
Here's the code:
SELECT
a.DOMAIN,
b.NAME,
a.DE_ID,
a.NAME,
a.PREFERRED_LABEL,
a.TECHNICAL_DEFINITION,
a.PUBLIC_DEFINITION,
a.DE_TYPE,
c1.NAME,
a.HAS_PARAMETER,
a.VALUE_CLASS,
c2.NAME,
a.INDEX_TERMS,
a.DATA_TABLE_ID,
d1.TABLE_NAME,
a.SP_INSERT,
a.SP_UPDATE,
a.SP_GET_BYMRN,
a.SP_GET_BYATTRIBUTE,
a.VALUE_TABLE_ID,
d2.TABLE_NAME,
a.PARAM_TABLE_ID,
d3.TABLE_NAME,
a.PARAM_DOMAIN_LOGIC,
a.SP_LOV,
a.LOWER_LIMIT,
a.UPPER_LIMIT,
a.BOOLEAN_Y,
a.BOOLEAN_N,
a.COMMENTS,
a.ENTERED_BY,
commons_API.get_person_full_name(a.ENTERED_BY),
a.ENTERED_ON
FROM
DATA_ELEMENT_INDEX a,
DE_DOMAIN b,
GENERAL_LIST c1,
GENERAL_LIST c2,
TABLE_GROUP d1,
TABLE_GROUP d2,
TABLE_GROUP d3
WHERE
DOMAIN = p_domain_id AND
b.DOMAIN_ID = a.DOMAIN AND
c1.ID = a.DE_TYPE AND
c2.ID = a.VALUE_CLASS AND
d1.TABLE_ID = a.DATA_TABLE_ID AND -- it works well without the next two lines
d2.TABLE_ID = a.VALUE_TABLE_ID "(+)" AND
d3.TABLE_ID = a.PARAM_TABLE_ID "(+)"
ORDER BY a.NAME;
Edited by: user10817976 on Oct 19, 2009 8:14 AMOne of my standard replies...
Oracle syntax does not support outer joining to more than one table.
However ANSI syntax does...
SQL> select * from a;
ID B_KEY C_KEY
1 2 3
2 1 4
3 3 1
4 4 2
SQL> select * from b;
ID C_KEY2
1 1
2 5
3 3
4 2
SQL> select * from c;
KEY1 KEY2 DTA
1 1 1-1
1 2 1-2
1 3 1-3
1 4 1-4
2 1 2-1
2 2 2-2
2 3 2-3
2 4 2-4
3 1 3-1
3 2 3-2
3 3 3-3
3 4 3-4
4 1 4-1
4 2 4-2
4 3 4-3
4 4 4-4
16 rows selected.
SQL> ed
Wrote file afiedt.buf
1 select a.id as a_id, b.id as b_id, c.key1 as c_key1, c.key2 as c_key3, c.dta
2 from a, b, c
3 where a.b_key = b.id
4 and a.c_key = c.key1 (+)
5* and b.c_key2 = c.key2 (+)
SQL> /
and a.c_key = c.key1 (+)
ERROR at line 4:
ORA-01417: a table may be outer joined to at most one other table
SQL> ed
Wrote file afiedt.buf
1 select a.id as a_id, b.id as b_id, c.key1 as c_key1, c.key2 as c_key3, c.dta
2 from a JOIN b ON (a.b_key = b.id)
3* LEFT OUTER JOIN c ON (a.c_key = c.key1 and b.c_key2 = c.key2)
SQL> /
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> -
OWB does not allow full outer join
I got following error (twice) while validating my mapping: "VLD-1506: Invalid Expression: Mixing full and partial outer joins in one mapping is not supported".
I have following join conditions in my mapping:
1) INGRP1.DISTRICT_ID = INGRP2.DISTRICT_ID And INGRP1.CHARGE_PERIOD_ID = INGRP2.CHARGE_PERIOD_ID And INGRP1.UTL_ID = INGRP2.UTL_ID
2) The same
3) INGRP1.CHARGE_PERIOD_ID (+) = INGRP2.CHARGE_PERIOD_ID (+) And
INGRP1.DISTRICT_ID (+) = INGRP2.DISTRICT_ID (+) And
INGRP1.PROVIDER# (+) = INGRP2.PROVIDER# (+)
I suppose there is not any partial joins here. I tried to make first and second conditions with full outer joins too:
INGRP1.DISTRICT_ID (+) = INGRP2.DISTRICT_ID (+) And
INGRP1.CHARGE_PERIOD_ID (+) = INGRP2.CHARGE_PERIOD_ID (+) And
INGRP1.UTL_ID (+) = INGRP2.UTL_ID (+) And
INGRP1.DISTRICT_ID IS NOT NULL And
INGRP2.DISTRICT_ID IS NOT NULL
If I do this, validation reports the same error, but six times instead of twice.
If I remove outer joins OWB generates following mapping statement:
MERGE
/*+ APPEND PARALLEL(MMB$ACCOUNT, DEFAULT, DEFAULT) */
INTO
"MMB$ACCOUNT"
USING
(SELECT
/*+ NO_MERGE */
"INGRP1"."DISTRICT_ID" "DISTRICT_ID",
DIC$TIME_RECODER."MONTH_ID" "MONTH_ID",
"INGRP1"."PROVIDER#" "PROVIDER#",
"INGRP1"."ACCOUNT_NO" "ACCOUNT_NO",
"INGRP2"."ACCOUNT_NO" "ACCOUNT_NO_1"
FROM "DIC$TIME_RECODER" DIC$TIME_RECODER,
(SELECT
/*+ DRIVING_SITE("AGG"."AGG_INPUT_SUBQUERY"."FC_CHARGES_1_GKH_REL2_GKH_STAR") */
"AGG"."CHARGE_PERIOD_ID" "CHARGE_PERIOD_ID",
"AGG"."DISTRICT_ID$0" "DISTRICT_ID",
"AGG"."PROVIDER#$0" "PROVIDER#",
"AGG"."ACCOUNT_NO$0" "ACCOUNT_NO"
FROM (SELECT
("AGG_INPUT_SUBQUERY"."CHARGE_PERIOD_ID$0") "CHARGE_PERIOD_ID",
("AGG_INPUT_SUBQUERY"."DISTRICT_ID$1") "DISTRICT_ID$0",
("AGG_INPUT_SUBQUERY"."PROVIDER#$1") "PROVIDER#$0",
COUNT(DISTINCT ("AGG_INPUT_SUBQUERY"."ACCOUNT_NO$1")) "ACCOUNT_NO$0"
FROM (SELECT
"INGRP1"."DISTRICT_ID" "DISTRICT_ID$1",
"INGRP1"."CHARGE_PERIOD_ID" "CHARGE_PERIOD_ID$0",
DM_UTILITIES_1_GKH_R14554."PROVIDER#" "PROVIDER#$1",
"FC_CHARGES_1_GKH_REL2_GKH_STAR"."ACCOUNT_NO" "ACCOUNT_NO$1"
FROM {"FC_CHARGES"@GKH_REL2_GKH_STAR} "FC_CHARGES_1_GKH_REL2_GKH_STAR",
{"DM_UTILITIES"@GKH_REL2_GKH_STAR} DM_UTILITIES_1_GKH_R14554,
(SELECT
"DEDUP"."DISTRICT_ID$2" "DISTRICT_ID",
"DEDUP"."CHARGE_PERIOD_ID$1" "CHARGE_PERIOD_ID",
"DEDUP"."UTL_ID" "UTL_ID"
FROM (SELECT
DISTINCT
"FC_CHARGES_GKH_REL2_GKH_STAR"."DISTRICT_ID" "DISTRICT_ID$2",
"FC_CHARGES_GKH_REL2_GKH_STAR"."CHARGE_PERIOD_ID" "CHARGE_PERIOD_ID$1",
"FC_CHARGES_GKH_REL2_GKH_STAR"."UTL_ID" "UTL_ID"
FROM {"FC_CHARGES"@GKH_REL2_GKH_STAR} "FC_CHARGES_GKH_REL2_GKH_STAR" WHERE ( (MAP_DIC$ACCOUNT."DATE_START") <= coalesce ( "FC_CHARGES_GKH_REL2_GKH_STAR"."CHANGED_DATE_#" , "FC_CHARGES_GKH_REL2_GKH_STAR"."CREATED_DATE_#" ) )) "DEDUP" ) "INGRP1" WHERE ( "INGRP1"."DISTRICT_ID" = "FC_CHARGES_1_GKH_REL2_GKH_STAR"."DISTRICT_ID" ) AND
( "INGRP1"."CHARGE_PERIOD_ID" = "FC_CHARGES_1_GKH_REL2_GKH_STAR"."CHARGE_PERIOD_ID" ) AND
( "INGRP1"."UTL_ID" = "FC_CHARGES_1_GKH_REL2_GKH_STAR"."UTL_ID" ) AND
( ( DM_UTILITIES_1_GKH_R14554."UTL_ID" (+) = "INGRP1"."UTL_ID" ) )) "AGG_INPUT_SUBQUERY"
GROUP BY
("AGG_INPUT_SUBQUERY"."DISTRICT_ID$1"), ("AGG_INPUT_SUBQUERY"."CHARGE_PERIOD_ID$0"), ("AGG_INPUT_SUBQUERY"."PROVIDER#$1")) "AGG" ) "INGRP1",
(SELECT
/*+ DRIVING_SITE("AGG_1"."AGG_INPUT_SUBQUERY$0"."FC_PAYMENTS_1_GKH_RE143940") */
"AGG_1"."PROVIDER#$2" "PROVIDER#",
"AGG_1"."DISTRICT_ID$3" "DISTRICT_ID",
"AGG_1"."CHARGE_PERIOD_ID$2" "CHARGE_PERIOD_ID",
"AGG_1"."ACCOUNT_NO$2" "ACCOUNT_NO"
FROM (SELECT
("AGG_INPUT_SUBQUERY$0"."PROVIDER#$3") "PROVIDER#$2",
("AGG_INPUT_SUBQUERY$0"."DISTRICT_ID$4") "DISTRICT_ID$3",
("AGG_INPUT_SUBQUERY$0"."CHARGE_PERIOD_ID$3") "CHARGE_PERIOD_ID$2",
COUNT(DISTINCT ("AGG_INPUT_SUBQUERY$0"."ACCOUNT_NO$3")) "ACCOUNT_NO$2"
FROM (SELECT
"INGRP1"."DISTRICT_ID" "DISTRICT_ID$4",
"INGRP1"."CHARGE_PERIOD_ID" "CHARGE_PERIOD_ID$3",
DM_UTILITIES_GKH_REL2_GKH."PROVIDER#" "PROVIDER#$3",
"FC_PAYMENTS_1_GKH_RE143940"."ACCOUNT_NO" "ACCOUNT_NO$3"
FROM {"FC_PAYMENTS"@GKH_REL2_GKH_STAR} "FC_PAYMENTS_1_GKH_RE143940",
{"DM_UTILITIES"@GKH_REL2_GKH_STAR} DM_UTILITIES_GKH_REL2_GKH,
(SELECT
"DEDUP_1"."DISTRICT_ID$5" "DISTRICT_ID",
"DEDUP_1"."CHARGE_PERIOD_ID$4" "CHARGE_PERIOD_ID",
"DEDUP_1"."UTL_ID$0" "UTL_ID"
FROM (SELECT
DISTINCT
"FC_PAYMENTS_GKH_REL2_GKH_STAR"."DISTRICT_ID" "DISTRICT_ID$5",
"FC_PAYMENTS_GKH_REL2_GKH_STAR"."CHARGE_PERIOD_ID" "CHARGE_PERIOD_ID$4",
"FC_PAYMENTS_GKH_REL2_GKH_STAR"."UTL_ID" "UTL_ID$0"
FROM {"FC_PAYMENTS"@GKH_REL2_GKH_STAR} "FC_PAYMENTS_GKH_REL2_GKH_STAR" WHERE ( (MAP_DIC$ACCOUNT."DATE_START") <= coalesce ( "FC_PAYMENTS_GKH_REL2_GKH_STAR"."CHANGED_DATE_#" , "FC_PAYMENTS_GKH_REL2_GKH_STAR"."CREATED_DATE_#" ) )) "DEDUP_1" ) "INGRP1" WHERE ( "INGRP1"."DISTRICT_ID" = "FC_PAYMENTS_1_GKH_RE143940"."DISTRICT_ID" ) AND
( "INGRP1"."CHARGE_PERIOD_ID" = "FC_PAYMENTS_1_GKH_RE143940"."CHARGE_PERIOD_ID" ) AND
( "INGRP1"."UTL_ID" = "FC_PAYMENTS_1_GKH_RE143940"."UTL_ID" ) AND
( ( DM_UTILITIES_GKH_REL2_GKH."UTL_ID" (+) = "INGRP1"."UTL_ID" ) )) "AGG_INPUT_SUBQUERY$0"
GROUP BY
("AGG_INPUT_SUBQUERY$0"."DISTRICT_ID$4"), ("AGG_INPUT_SUBQUERY$0"."CHARGE_PERIOD_ID$3"), ("AGG_INPUT_SUBQUERY$0"."PROVIDER#$3")) "AGG_1" ) "INGRP2" WHERE ( "INGRP1"."CHARGE_PERIOD_ID" = "INGRP2"."CHARGE_PERIOD_ID" ) AND
( "INGRP1"."DISTRICT_ID" = "INGRP2"."DISTRICT_ID" ) AND
( "INGRP1"."PROVIDER#" = "INGRP2"."PROVIDER#" ) AND
( ( DIC$TIME_RECODER."PERIOD_ID" (+) = "INGRP1"."CHARGE_PERIOD_ID" ) )
) "MERGEQUERY_325"
ON (
"MMB$ACCOUNT"."DISTRICT_ID" = "MERGEQUERY_325"."DISTRICT_ID" AND
"MMB$ACCOUNT"."MONTH_ID" = "MERGEQUERY_325"."MONTH_ID" AND
"MMB$ACCOUNT"."PROVIDER_ID" = "MERGEQUERY_325"."PROVIDER#" )
WHEN NOT MATCHED THEN
INSERT
("MMB$ACCOUNT"."DISTRICT_ID",
"MMB$ACCOUNT"."MONTH_ID",
"MMB$ACCOUNT"."PROVIDER_ID",
"MMB$ACCOUNT"."QNT_CHARGED",
"MMB$ACCOUNT"."QNT_PAID")
VALUES
("MERGEQUERY_325"."DISTRICT_ID",
"MERGEQUERY_325"."MONTH_ID",
"MERGEQUERY_325"."PROVIDER#",
"MERGEQUERY_325"."ACCOUNT_NO",
"MERGEQUERY_325"."ACCOUNT_NO_1")
WHEN MATCHED THEN
UPDATE
SET
"QNT_CHARGED" = "MERGEQUERY_325"."ACCOUNT_NO",
"QNT_PAID" = "MERGEQUERY_325"."ACCOUNT_NO_1";
What does it mean? Is JOINER's full outer join is incompatible with KEY LOOKUP operator and KL should be replaced with WB_LOOKUP_NUM?Sanders,
Key lookup always does a partial outer join. When the full outer join and partial outer join conditions are put together, there is no available syntax to facilitate it.
The way to this to generate the join operator (with full outer join) first in a subquery, then generate the key lookup as the outer query. Or the other way around, first the key lookup then the full outer join. The important part is that the key lookup can't be merged into the FROM-list.
So there are two workarounds. One is what you already pointed out, using WB_LOOKUP_NUM.
The other is to explicitly spell out the key lookup logic in the mapping by introducing a join with the lookup table, like this.
Change
Table1
.......... Join (w/ foj cond.) ---> KeyLookup
Table2
to
Table1
.......... Join (w/ foj cond)
Table2 ........................ Join (w/ poj cond.) ---> Lookup table
Nikolai Rochnik -
Hi,
I am trying to do a right outer join between 2 tables say a and b, and I specify the following condition in the joiner as follows, say
a.deptno(+) = b.deptono. But it throws an error during deployment as follows
PL/SQL: ORA-25156: old style outer join (+) cannot be used with ANSI joins.
I am using OWB Release 10.2(Paris)
Your help would be appreciated.
regards,
varshaHi
Check the generated code from the mapping, or the internediate result in the mappings output group.
Maybe you should use new oter join definitions:
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm#sthref3175
Ott Karesz
http://www.trendo-kft.hu -
Query Of Queries : Error When Trying To Fake Left Outer Join
Hi there
I am trying to replicate a left outer join, combining two query of queries using a method I located here
However, I keep getting an error message..
Here is the code I am using....
<cfquery dbtype="query" name="qry">
SELECT *
FROM returnQry, returnQry2
WHERE returnQry.mediumImage = returnQry2.mediumImage
ORDER BY returnQry.name
</cfquery>
<cfquery name="returnQry3" dbtype="#application.mx#">
SELECT *
FROM trackmeanings AS t
</cfquery>
<cfquery dbtype="query" name="endQry">
SELECT name,nameRcd,mediumImage, COUNT(sMessage) AS comments
FROM qry, returnQry3
WHERE qry.name = returnQry3.sNameTrack
UNION
SELECT name,nameRcd,mediumImage, COUNT(sMessage) AS comments
FROM qry, returnQry3
WHERE #qry.name# NOT IN (#QuotedValueList(returnQry3.sNameTrack)#)
GROUP BY name,nameRcd,mediumImage
</cfquery>
When I try to use the query output in a page, i get the error message "Incorrect conditional expression, Expected one of [like|null|between|in|comparison] condition"
Would anyone have any ideas?
Many thanksActually , spoke a little too soon, my query now seems to be outputting duplicates when the value is found on both sides of the union, my group by clause doesnt seem to be eliminating them like it usually does.
My SELECT code now reads
<cfquery dbtype="query" name="endQry">
SELECT name,nameRcd,mediumImage, COUNT(sMessage) AS comments
FROM qry, returnQry3
WHERE qry.name = returnQry3.sNameTrack
GROUP BY name,nameRcd,mediumImage
UNION
SELECT name,nameRcd,mediumImage, 0 AS comments
FROM qry
WHERE qry.name NOT IN (<cfqueryparam
value="#returnQry3.sNameTrack#"
cfsqltype="cf_sql_varchar"
list="yes"
/>)
GROUP BY name,nameRcd,mediumImage
ORDER BY name DESC
</cfquery>
and my ouput...is producing duplicates
<cfoutput query="rc.qryTopTracks" group="name">
#rc.qryTopTracks.name#
</cfoutput>
Would you have any idea of how to eliminate them here? Thanks -
How to Specify Left Outer Join in OWB
If I run the query:
select s.school_id,
nvl(max(decode(cv.cat_id, 'UCL', cv.long_desc, null)),'Unknown') UCL,
nvl(max(decode(cv.cat_id, 'REGION', cv.long_desc, null)),'Unknown') REGION,
nvl(max(decode(cv.cat_id, 'TREASREG', cv.long_desc, null)),'Unknown') TREASREG,
nvl(max(decode(cv.cat_id, 'RELGN', cv.long_desc, null)),'Unknown') RELGN,
nvl(max(decode(cv.cat_id, 'NGEFF', cv.long_desc, null)),'Unknown') NGEFF,
nvl(max(decode(cv.cat_id, 'PCAP', cv.long_desc, null)),'Unknown') PCAP,
nvl(max(decode(cv.cat_id, 'ATSIC', cv.long_desc, null)),'Unknown') ATSIC
from sdw.sdr_schools s
left outer join
sdw.sdr_school_category_values scv on s.school_id = scv.school_id
left outer join
sdw.sdr_category_values cv on cv.cat_id = scv.cat_id
and cv.cat_value_id = scv.cat_value_id
group by s.school_id
order by s.school_id
I get 1706 records. In OWB I get 1656 records.
In OWB I use a JOIN for the three tables, then an expression for the decode lines and sort and then the final table. In the SQL above, if the second left outer join is removed I get 1656 records?
Ho do you force OWB to produce 1706 records?You have to use the (+) notation.
e.g.
table1.column1 (+) = table2.column1
Also, you can do a full-outer-join using table1.column1 (+) = table2.column1 (+) even though this is not legal SQL*Plus syntax. -
Full outer join query giving error
Hi I have written the below query to get the fields below as an out put but am getting the error missing keyword..am not understanding where did i missed..i have done step by step query analysis..but could not find the error.
Please help me in resolving the issue.
Expected output Columns :*
COUNTRY , TRN_TYPE ,SKU ,BIX_Customer ,PERIOD ,CURRENTSTOCK ,STOCK_VALUE ,SALES ,SALES_VALUE ,TARGET
Query :_
select (case when a.country is null then b.country when b.country is null then c.country else a.country end) AS COUNTRY,
(case when a.Sale_Type is null then b.Stk_type when b.stk_type is null then c.Stk_type else a.Sale_Type end) AS TRN_TYPE,
(case when a.sku is null then b.sku when b.sku is null then c.sku else a.sku end) AS SKU,
(case when a.bix_customer is null then b.bix_customer_code when b.bix_customer_code is null then c.bix_customer_code else a.bix_customer end)AS BIX_Customer ,
(case when a.period is null then TO_number(b.period) when b.period is null then TO_NUMBER(c.period) else a.period end) AS PERIOD,
nvl(b.CURRENTSTOCK,0) AS CURRENTSTOCK,
nvl(b.stock_value,0) AS STOCK_VALUE,
nvl(a.sales,0) AS SALES,
nvl(a.SALES_VALUE,0) AS SALES_VALUE,
nvl(c.TARGET_QTY,0) AS TARGET
from
(select UPPER(c.cust_country_name) AS COUNTRY,
DECODE(ds.account_key,7156,'SAMPLE',7157,'BONUS',7485,'SALE') AS Sale_Type,
substr(i.item_code,7) AS SKU,
c.bix_customer_code AS BIX_Customer,
ds.descr as descr ,
ds.period as period,
sum(ds.quantity) AS SALES,
sum(case when ds.local_value is null then ds.euro_value else ds.local_value END) AS SALES_VALUE
FROM distributor_sales ds, customer c, item i
where ds.customer_key=c.customer_key
and ds.item_key= i.item_key
group by ds.period,
ds.account_key,
c.cust_country_name,
substr(i.item_code,7),
c.bix_customer_code,
ds.descr) a
full outer join
(SELECT UPPER(b.cust_country_name) AS COUNTRY,
DECODE(s.stock_type,'SALE','SALE','SALES','SALE','BONUS','BONUS','SAMPLE','SAMPLE') AS Stk_type,
substr(c.item_code,7) AS SKU,
s.descr as descr,
s.period as period,
b.bix_customer_code,
sum(s.CLOSING_STOCK) CURRENTSTOCK,
sum(s.closing_stock*s.cif_price) STOCK_VALUE
FROM STOCK s, customer b, item c
WHERE s.customer_key=b.customer_key
and s.item_key= c.item_key
group by
s.descr,
s.stock_type,
s.period, b.bix_customer_code,b.cust_country_name,substr(c.item_code,7) ) b
full outer join
(SELECT UPPER(cu.cust_country_name) AS COUNTRY,
DECODE(t.description,'SALES TARGET','SALE') AS Stk_type,
substr(it.item_code,7) AS SKU,
t.channel as channel,
t.period as period,
cu.bix_customer_code as bix_customer_code,
sum(t.quantity) TARGET_QTY
FROM sales_target t, customer cu, item it
WHERE t.customer_key=cu.customer_key
and t.item_key= it.item_key
group by
t.channel,
t.description,
t.period, cu.bix_customer_code,cu.cust_country_name,substr(it.item_code,7) ) c
on a.SKU=b.SKU
and a.sku=c.SKU
and b.sku=c.SKU
and a.BIX_Customer=b.bix_customer_code
and a.BIX_Customer=c.bix_customer_code
and b.bix_customer_code=c.bix_customer_code
and a.Sale_Type=b.Stk_type
and a.Sale_Type=c.Stk_type
and b.Stk_type=c.Stk_type
and a.descr=b.descr
and b.descr=c.channel
and a.descr=c.channel
and a.country=b.country
and a.country=c.COUNTRY
and b.country=c.COUNTRY
and a.period=b.period
and a.period=c.period
and b.period=c.period;<tt>Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production</tt>
You must be aware that you must cascade full outer joins
with
t1 as
(select 1 key,1.1 data from dual union all
select 3,1.3 from dual union all
select 6,1.6 from dual union all
select 7,1.7 from dual
t2 as
(select 2 key,2.2 data from dual union all
select 3,2.3 from dual union all
select 4,2.4 from dual union all
select 6,2.6 from dual
t3 as
(select 4 key,3.4 data from dual union all
select 5,3.5 from dual union all
select 6,3.6 from dual union all
select 7,3.7 from dual
select nvl(x.key,t3.key) key,
x.data_1,
x.data_2,
t3.data data_3
from (select nvl(t1.key,t2.key) key,
t1.data data_1,
t2.data data_2
from t1
full outer join
t2
on t1.key = t2.key
) x
full outer join
t3
on t3.key = x.key
order by keyunless you can live with duplicate key rows you cannot avoid whenever all table pairs contain common keys (try the below using data from above)
select coalesce(t1.key,t2.key,t3.key) key,
t1.data data_1,
t2.data data_2,
t3.data data_3
from t1
full outer join
t2
on t1.key = t2.key
full outer join
t3
on t3.key = t1.key
and t3.key = t2.key
order by key
select coalesce(t1.key,t2.key,t3.key) key,
t1.data data_1,
t2.data data_2,
t3.data data_3
from t2
full outer join
t3
on t2.key = t3.key
full outer join
t1
on t1.key = t2.key
and t1.key = t3.key
order by key
select coalesce(t1.key,t2.key,t3.key) key,
t1.data data_1,
t2.data data_2,
t3.data data_3
from t1
full outer join
t3
on t1.key = t3.key
full outer join
t2
on t2.key = t1.key
and t2.key = t3.key
order by keyRegards
Etbin
Edited by: Etbin on 10.4.2013 9:53
If you're after
select *
from (select *
from (select *
from t1
) a
full outer join
(select *
from t2
) b
on t1.key = t2.key
) x
full outer join
t3
on t3.key = x.key
order by keyyou're presently at
select *
from (
(select *
from t1
) a
full outer join
(select *
from t2
) b
on t1.key = t2.key
) x
full outer join
t3
on t3.key = x.key
order by keyORA-00933: SQL command not properly ended -
While using the Old syntax of outer join i encountered Ora-01719 error .
This is quite strange when i used the Old way of using Outer Joins(+), i encountered the Ora-01719 error saying Outer Joins not allowed in Or and IN operator.Whereas when i use the ANSI sql i query gets executed without any error.Any idea what might be the reason..is it that i myself is making mistake.
Please find the select statement below..
SELECT d4.c2, d4.c8, vw_rpt_prod_ln_grp.prod_grp_desc, d4.c10, d4.c5, d4.c3,
CASE
WHEN d4.c6 = 'Closed'
THEN d4.c6
WHEN d4.c6 = 'Closed (w/o Action)'
THEN d4.c6
WHEN d4.c6 =
'Closed, Supporting Process(es) Active'
THEN d4.c6
WHEN d4.c6 = 'Cancelled'
THEN d4.c6
WHEN t3.workflow_compnt_id = 1
THEN 'Definition'
WHEN t3.workflow_compnt_id = 2
THEN 'Root Cause'
WHEN t3.workflow_compnt_id = 3
THEN 'Solution'
WHEN t3.workflow_compnt_id = 4
THEN 'Implementation'
WHEN t3.workflow_compnt_id = 5
THEN 'Feedback'
WHEN t3.workflow_compnt_id = 9
THEN 'Preliminary Root Cause'
WHEN t3.workflow_compnt_id = 2001
THEN 'Report'
WHEN t3.workflow_compnt_id = 2002
THEN 'Sent'
WHEN t3.workflow_compnt_id = 2003
THEN 'Add. Info Needed'
WHEN t3.workflow_compnt_id = 2004
THEN 'Open'
WHEN t3.workflow_compnt_id = 2007
THEN 'Solution Feedback'
END issue_workflow_status,
CASE
WHEN d4.c6 = 'Closed'
THEN 0
WHEN d4.c6 = 'Closed (w/o Action)'
THEN 0
WHEN d4.c6 =
'Closed, Supporting Process(es) Active'
THEN 0
WHEN d4.c6 = 'Cancelled'
THEN 0
ELSE t3.workflow_compnt_id
END issue_workflow_status_code,
d4.c6, d4.c9,
CASE t3.issue_step_status_cd
WHEN 'In Progress'
THEN t3.step_target_submit_dt
WHEN 'Needs Additional Information'
THEN t3.step_target_submit_dt
WHEN 'Awaiting Approval'
THEN t3.step_target_closed_dt
ELSE NULL
END target_date,
CASE
WHEN CASE t3.issue_step_status_cd
WHEN 'In Progress'
THEN t3.step_target_submit_dt
WHEN 'Needs Additional Information'
THEN t3.step_target_submit_dt
WHEN 'Awaiting Approval'
THEN t3.step_target_closed_dt
ELSE NULL
END IS NULL
THEN 'N'
WHEN CASE t3.issue_step_status_cd
WHEN 'In Progress'
THEN t3.step_target_submit_dt
WHEN 'Needs Additional Information'
THEN t3.step_target_submit_dt
WHEN 'Awaiting Approval'
THEN t3.step_target_closed_dt
ELSE NULL
END < TRUNC (CURRENT_DATE)
THEN 'Y'
ELSE 'N'
END step_is_late,
t3.orig_user_full_nm, t3.champ_user_full_nm, t3.champ_org_nm,
vw_rpt_defntn.modl_yr_nbr, vw_rpt_vpps_lvl.level1_vpps_desc,
vw_rpt_vpps_lvl.level2_vpps_desc, vw_rpt_vpps_lvl.level3_vpps_desc,
vw_rpt_vpps_lvl.level4_vpps_desc,
Mv_RPT_CONCAT_ENGN_OPTN_ALL.concat_engn_optn,
vw_rpt_incdnt_src_three_level.level1_incdnt_src_desc,
vw_rpt_incdnt_src_three_level.level2_incdnt_src_desc,
vw_rpt_incdnt_src_three_level.level3_incdnt_src_desc,
vw_rpt_warranty_labr_code.concat_warranty_labr_code_desc, d4.c4, d4.c7,
vw_cust_survey_type.cust_survey_type_desc,
vw_complaint_ctg.complaint_ctg_cd,
vw_prob_main_cause.prob_main_cause_desc, soltn_step.confidence_lvl_id,
d4.c12, d4.c13
FROM (SELECT DISTINCT vw_rpt_issue.project_id c0,
vw_rpt_issue.prts_prod_ln_id c1,
vw_rpt_issue.issue_id c2,
vw_rpt_issue.disply_issue_nbr c3,
vw_rpt_issue.issue_sevrty_cd c4,
vw_rpt_issue.proj_nbr c5,
vw_rpt_issue.issue_status_cd c6,
vw_rpt_issue.primry_metric_score_nbr c7,
vw_rpt_issue.issue_type_cd c8, vw_rpt_issue.title c9,
vw_rpt_issue.prts_prod_ln_desc c10,
vw_rpt_leadtime.issue_id c11,
vw_rpt_leadtime.definition_start_dt c12,
vw_rpt_leadtime.definition_close_dt c13,
vw_rpt_leadtime.root_cause_start_dt c14,
vw_rpt_leadtime.root_cause_close_dt c15,
vw_rpt_leadtime.solution_start_dt c16,
vw_rpt_leadtime.solution_end_dt c17,
vw_rpt_leadtime.implementation_start_dt c18,
vw_rpt_leadtime.implementation_close_dt c19,
vw_rpt_leadtime.feedback_start_dt c20,
vw_rpt_leadtime.feedback_end_dt c21,
vw_rpt_leadtime.prc_start_dt c22,
vw_rpt_leadtime.prc_end_dt c23,
defntn_step.issue_id c24,
defntn_step.workflow_compnt_id c25,
defntn_step.complaint_ctg_id c26,
defntn_step.contnmt_actn_plan_id c27,
defntn_step.direct_run_imprvm_pct c28,
defntn_step.direct_run_loss_pct c29,
defntn_step.drive_type_id c30,
defntn_step.driving_cond_id c31,
defntn_step.eng_pgm_nbr c32,
defntn_step.engn_serial_nbr c33,
defntn_step.envrnmtl_cond_id c34,
defntn_step.ergo_rating_id c35,
defntn_step.evaltn_complt_pct c36,
defntn_step.evaltn_procdr_id c37,
defntn_step.gca_50_or_safety_issue_flag c38,
defntn_step.gca_value_amt c39,
defntn_step.gm_rating_id c40,
defntn_step.hardware_stage_id c41,
defntn_step.incdnt_discvrd_by_nm c42,
defntn_step.incdnt_discvr_dept_nm c43,
defntn_step.incdnt_discvr_ph_nbr c44,
defntn_step.incdnt_first_rptd_dt c45,
defntn_step.incdnt_src_id c46,
defntn_step.intrnl_measmt_info_owner_nm c47,
defntn_step.intrnl_measmt_plt_faclty_id c48,
defntn_step.intrnl_measmt_rpt_dt c49,
defntn_step.issue_clasfn_id c50,
defntn_step.issue_ctg_id c51,
defntn_step.issue_intgrtn_id c52,
defntn_step.modl_yr_id c53,
defntn_step.modl_yr_qtr_id c54,
defntn_step.odmtr_msmt_unit_id c55,
defntn_step.odmtr_rdng_msmt_unit_id c56,
defntn_step.odmtr_rdng_nbr c57,
defntn_step.odmtr_rdng_beginning_nbr c58,
defntn_step.odmtr_rdng_ending_nbr c59,
defntn_step.part_drblty_msmt_unit_id c60,
defntn_step.part_drblty_nbr c61,
defntn_step.part_test_msmt_unit_id c62,
defntn_step.part_test_nbr c63,
defntn_step.pe_me_trial_issue_flag c64,
defntn_step.pim_nbr c65,
defntn_step.plt_asmbly_doc_nbr c66,
defntn_step.productivity_nbr c67,
defntn_step.suspect_parts_avbl_flag c68,
defntn_step.suspect_parts_loc_txt c69,
defntn_step.trnsmn_serial_nbr c70,
defntn_step.veh_ident_nbr c71,
defntn_step.veh_proprt_nbr c72,
defntn_step.veh_test_msmt_unit_id c73,
defntn_step.veh_test_nbr c74,
defntn_step.vpps_id_nbr c75,
defntn_step.wrkstn_id c76,
defntn_step.road_surface_id c77,
defntn_step.cost_redctn_rpt_dt c78,
defntn_step.cost_redctn_trackg_nbr c79,
defntn_step.cost_redctn_type_id c80,
defntn_step.cust_survey_dt c81,
defntn_step.warnty_impct_rpt_dt c82,
defntn_step.field_prod_rpt_nbr c83
FROM (SELECT DISTINCT mv_rpt_issue_all.project_id
project_id,
mv_rpt_issue_all.prts_prod_ln_id
prts_prod_ln_id,
mv_rpt_issue_all.issue_id issue_id,
mv_rpt_issue_all.disply_issue_nbr
disply_issue_nbr,
mv_rpt_issue_all.issue_sevrty_cd
issue_sevrty_cd,
mv_rpt_issue_all.proj_nbr proj_nbr,
mv_rpt_issue_all.issue_status_cd
issue_status_cd,
mv_rpt_issue_all.primry_metric_score_nbr
primry_metric_score_nbr,
mv_rpt_issue_all.issue_type_cd
issue_type_cd,
mv_rpt_issue_all.title title,
mv_rpt_issue_all.prts_prod_ln_desc
prts_prod_ln_desc
FROM mv_rpt_issue_all,
vw_sec_acs_grp_proj acs_grp_proj
WHERE acs_grp_proj.acs_grp_id IN
(1,
4,
42,
43,
44,
51,
52,
53,
54,
266,
366,
386,
526,
546,
547,
548,
566,
846,
946,
966,
1006,
1066,
1087
AND mv_rpt_issue_all.prts_prod_ln_id =
acs_grp_proj.prts_prod_ln_id
AND mv_rpt_issue_all.project_id =
acs_grp_proj.project_id
AND mv_rpt_issue_all.issue_type_cd =
'Current Production') vw_rpt_issue,
vw_rpt_leadtime,
vw_defntn_step defntn_step
WHERE vw_rpt_issue.issue_id = vw_rpt_leadtime.issue_id
AND vw_rpt_issue.issue_id = defntn_step.issue_id) d4,
vw_rpt_incdnt_src_three_level,
vw_rpt_warranty_labr_code,
vw_rpt_prod_ln_grp,
(SELECT t1.issue_id issue_id, t1.workflow_compnt_id workflow_compnt_id,
t1.issue_step_status_cd issue_step_status_cd,
t1.step_target_closed_dt step_target_closed_dt,
t1.step_target_submit_dt step_target_submit_dt,
t1.orig_user_full_nm orig_user_full_nm,
t1.champ_user_full_nm champ_user_full_nm,
t1.champ_org_nm champ_org_nm
FROM prts_syst.vw_rpt_issue_step_dtl_all t1
WHERE t1.current_step_flag = 'Y') t3,
vw_complaint_ctg,
root_cause_step,
vw_prob_main_cause,
Mv_RPT_CONCAT_ENGN_OPTN_ALL,
vw_rpt_vpps_lvl,
soltn_step,
vw_rpt_defntn_all vw_rpt_defntn,
vw_cust_survey_impct_dtl cust_survey_impct_dtl,
vw_cust_survey_type
WHERE d4.c46 = vw_rpt_incdnt_src_three_level.level3_incdnt_src_id(+)
Or d4.c46=vw_rpt_incdnt_src_three_level.level2_incdnt_src_id(+))
And vw_rpt_incdnt_src_three_level.level3_incdnt_src_id IS NULL
AND d4.c2 = vw_rpt_warranty_labr_code.issue_id(+)
AND d4.c1 = vw_rpt_prod_ln_grp.prts_prod_ln_id(+)
AND d4.c2 = t3.issue_id(+)
AND d4.c26 = vw_complaint_ctg.complaint_ctg_id(+)
AND d4.c2 = root_cause_step.issue_id(+)
AND root_cause_step.prob_main_cause_id = vw_prob_main_cause.prob_main_cause_id(+)
AND d4.c2 = Mv_RPT_CONCAT_ENGN_OPTN_ALL.issue_id(+)
AND d4.c75 = vw_rpt_vpps_lvl.vpps_id_nbr(+)
AND d4.c2 = soltn_step.issue_id(+)
AND d4.c2 = vw_rpt_defntn.issue_id(+)
AND d4.c2 = cust_survey_impct_dtl.issue_id(+)
AND cust_survey_impct_dtl.cust_survey_type_id = vw_cust_survey_type.cust_survey_type_id(+)
AND vw_rpt_prod_ln_grp.prod_grp_desc IN
('DB Admin', 'GM - All Vehicles', 'GMAP - DAT', 'GMAP - Holden')
AND d4.c6 IN
('Cancelled',
'Closed',
'Closed (w/o Action)',
'Closed, Supporting Process(es) Active',
'Draft',
'Open'
);Hi,
Maestro_Vineet wrote:
This is quite strange when i used the Old way of using Outer Joins(+), i encountered the Ora-01719 error saying Outer Joins not allowed in Or and IN operator.Whereas when i use the ANSI sql i query gets executed without any error.Any idea what might be the reason..is it that i myself is making mistake.No, I don't think you're making any mistake. Some things are simply not allowed with the "+" outer-join syntax.
There are work-arounds, but they are harder to code and slower to run than simply using ANSI syntax.
I recommend always using ANSI syntax, especially for outer joins. -
Oracle outer join on multiple tables throws error
Hi ,
We are using ansi joins with outer joins on multiple tables in oracle 9i.
Now these queries have to be used in Oracle8i.
Since Oracle8i does not support ansi sql we are replacing the ansi sql queries with the oracle joins.
On trying the same we found that the following query
select *from tab1 a, tab2 b, tab3 c where a.c1 = b.col1(+) and c.c2 = b.col2 (+)
throws the error
ORA-01417: a table may be outer joined to at most one other table.
Is there a way to simulate this query without using the outer joins on multiple tables?
thanksTry writing the query in this form:
select * from
(select t1.col1, t1.col2
from schema.table1 t1, schema.table2 t2
where t1.col1 = t2.col1(+)) t4,
schema.table3 t3 where t4.col2 = t3.col2(+)
In the subquery, you will have to list all the columns you want to see, and you will need to provide unique aliases for any columns with duplicate names. I tested this on 9i, and don't have an 8i system to work with, so I hope this helps. -
So, I have a complex VO that includes two updatable entities. One of these is an outer join. It's an adjustment table which has a 0-1 relation with travel Request table that has an estimated amount.
I only want a record in this adjustement table when there's a change.
HOWEVER, if I make a change on the screen to the fields in my other entity, ADF wants to insert into the outer join table and I get an error because the field is null and it's required.
So, how do I keep ADF from inserting a row into the outer join but still update the other entity?
I'm using JDev 11.1.1.3.0
Thanks,
JetThanks for the feedback. I had to remember to go back and add it to the App Module and juggle the bindings a bit, but I got it sorted out so it doesn't error
However when I do that and
if there is no row
cuz there hasn't been an adjustment yet
it doesn't give me a field to enter one in. It just prints the label with nothing next to it??????????????????
if I already put a row in then it displays properly and I can change it.
How do I make it give me a field so I can insert a row when required? -
Error in making left outer join to a nested query
i am writing this query getting error here i am using nested query with that i am making join it is giving error
SQL
SELECT
* FROM IVItem INNER JOIN
IVPackSize_Mst ON IVItem.PackSizeID = IVPackSize_Mst.Id
left outer join IvItemGenericLink on IvItemGenericLink.itemID=IVItem.Id
Select GenericId from
IvItemGenericLink where ItemID=IVItem.Id and rownum <=1
)x
and x on IvItemGenericLink.GenericId=x.GenericId;
Error report:
SQL Error: ORA-00936: missing expression
00936. 00000 - "missing expression"
*Cause:
*Action:
give me and suggestioni am using left outer join at virtual table say x your gave me its equivalent
EXISTS (SELECT 1 FROM IvItemGenericLink G
WHERE G.ITEMID =V.ID
AND G.GenericId = L.GenericId)-----its i guess inner join
i am not confirmed that why iam asking this i guess i have to use this
as i use keyword inner join for inner join and for left join i use
left outer join
EXISTS (SELECT 1 FROM IvItemGenericLink G
WHERE G.ITEMID =V.ID
AND G.GenericId(+) = L.GenericId)-----its i guess left outer join
left outer join
Select GenericId from
IvItemGenericLink where ItemID=IVItem.Id and rownum <=1
)*x*
IvItemGenericLink.GenericId=x.GenericId
-------------------Statement U Gave in this--------------------------------------------------------------------------
SELECT *
FROM IVITEM V, IVPACKSIZE_MST M , IVITEMGENERICLINK L,
WHERE V.PACKSIZEID = M.ID
AND V.ID = L.ITEMID (+)
AND EXISTS (SELECT 1 FROM IvItemGenericLink G
WHERE G.ITEMID =V.ID
AND G.GenericId = L.GenericId)
-------------------Statement U Gave in this--------------------------------------------------------------------------
is this equivalent to left outer join
*AND EXISTS (
SELECT 1 FROM IvItemGenericLink G*
WHERE G.ITEMID =V.ID
*AND G.GenericId = L.GenericId
please tell me this in this regard -
Internal Assertion Error while using outer join
Hi-
Has anyone experienced this error before: State: HY000. Code: 397397248. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46036] Internal Assertion: Condition !pConjunct->IsAndCond(), file server/Query/Optimizer/Request/Src/SQORToCNF.cpp, line 46. (HY000)
It happened after I changed the join in logical layer from inner join into left outer join from Fact Tab1 to Fact Tab2, This needs to be changed for cases:
Fact Tab1 contains:
Period|Currency|FX Rate
Mar-09|USD|1
Apr-09|USD|1.1
Fact Tab2 contains:
Period|Currency|Product|Profit
Mar-09|USD|Metal Abs|1000
Mar-09|USD|Grey Wood|2000
Expected Result:
Period|Currency|Product|Profit|FX Rate
Mar-09|USD|Metal Abs|1000|1
Mar-09|USD|Grey Wood|2000|1
Apr-09|USD|(NULL)|(NULL)|1.1
But, it shows the error as above (have changed the SERVER_THREAD_STACK_SIZE to 512 KB too but no luck, any idea?
Thanks,
WillHey Will,
Recently I've seen OBIEE generate some bad queries on an Oracle Database. I had setup a few time series measures and when I added more than three into a report, I got a table not found error. It turned out that it was a combination of the query getting very complex and the way it was using ANSI SQL Left Outer Join operator. I'm wondering if your situation is similar.
Can you try the following?
1. Log into the RPD and for your user, set the logging level to 7 (Manage->Security then find your user).
2. Clear all the caches (BI Server=Manage->Cache delete them all, Presentation Server=Settings->Manage Sessions then close all cursors)
3. Run the report for a date range that works fine
4. Run the report for a date range that causes the error.
5. Look at the physical SQL generated in the log files (Settings->Manage Sessions)
Compare the two queries and see if anything stands out. In fact try to execute both in SQL Developer or Toad and see if you get any errors. If you can, post the physical SQL and I might be able to notice something.
Just to confirm, you're using OCI to connect to an Oracle source right?
In my situation, I fixed it by disabling the LEFT OUTER JOIN syntax on the database. We might be able to get you to do something similar to fix your problem.
Thanks!
-Joe -
Error occurred when executing query involving cross join or outer join
Hi,
I tried to execute the following query:
select count(*)
from
po,
invoice,
table(xmlsequence(extract(invoice.content, '/CommercialInvoice/Body/LineItemDetails/LineItem'))) invoice_line_item
where
extractValue(po.content, '/PurchaseOrder/Header/DocumentID/RID') =
extractValue(value(invoice_line_item), '/LineItem/Product/PurchaseOrderIdentifier/documentCreatorIdentifier')(+)
It produced the following error:
Error: ORA-00936: missing expression
Then I change the query to:
select count(*)
from
po left outer join
invoice cross join
table(xmlsequence(extract(invoice.content, '/CommercialInvoice/Body/LineItemDetails/LineItem'))) invoice_line_item
on
extractValue(po.content, '/PurchaseOrder/Header/DocumentID/RID')
= extractValue(value(invoice_line_item), '/LineItem/Product/PurchaseOrderIdentifier/documentCreatorIdentifier')
It produced the following error:
Error: ORA-00904: "INVOICE"."SYS_NC0012900130$": invalid identifier
If I simply the query to:
select 1
from
invoice cross join
table(xmlsequence(extract(invoice.content, '/CommercialInvoice/Body/LineItemDetails/LineItem'))) invoice_line_item
It also produced the following error:
Error: ORA-00904: "INVOICE"."SYS_NC0012900130$": invalid identifier
What is the cause of the problem? How to resolve it?
The version I am using is 10.1.0.2.0 on Windows. Any help would be much appreciated.Hi,
Recently we went for BW upgradatiaon (BI7.0) , the error you are facing could be due to the following issue,
If infoobjects are used in infoset as infoprovider ( in BW3.5) after upgrade this infoobjects will not be selected automatically as infoproviders. So it will not be available for Infoset.
Please check whether any infoobjects are used as infoprovider, if so manually change them as infoprovider ( In BI7) and activate.
Since, few reports are working on the infoset , this could be those reports are not using the fields from the infoobjects. so it is working it seems.
Please check and let me know.
Thanks,
V.Senthil -
Using FILTER after a FULL OUTER JOIN problem in OWB
Hi,
I’m using OWB 11.2.
In an OWB mapping I need to detect every changes (Insert, Update, Delete) made to the data of a table. In order to find these changes I need to use “FULL OUTER JOIN” and a “FILTER” to join current table to previous table.
My desired generated query should be like this:
Select *
From tab1 FULL OUTER JOIN tab2 on JOIN_CONDITION
WHERE FILTER_CONDITION
The problem is that when OWB generates the code, the query will be like this:
Select *
From tab1 FULL OUTER JOIN tab2 on JOIN_CONDITION AND FILTER_CONDITION
As you know these 2 queries are not the same at all!
I don’t know how to make OWB generate my desired SQL. Please help me…Works ok on 11.2.0.3
Are you using "( + )" for join condition in joiner? Or, are you using "Join input role" parameter to define full outer join condition? Are you using oracle or ANSI syntax? -
Full outer join --- bug? Urgent
Hi,
I have a simple mapping using 2 source tables and doing an full outer join. While executing the mapping it is throwing me out with an error --
Starting Execution LOAD_SAP
Starting Task LOAD_SAP
ORA-01790: expression must have same datatype as corresponding expression
ORA-02063: preceding line from ODSD@LOC_TGT_LOC_ODSD
ORA-06512: at "DWH_USER.LOAD_SAP", line 12
ORA-06512: at "DWH_USER.LOAD_SAP", line 481
ORA-06512: at "DWH_USER.LOAD_SAP", line 795
ORA-06512: at "DWH_USER.LOAD_SAP", line 1973
ORA-06512: at line 1
Completing Task LOAD_SAP
Completing Execution LOAD_SAP
The SQL generated at line 12 is -
CURSOR "JOIN_c" IS
SELECT
/*+ DRIVING_SITE("CONNECTION_LOC_TGT_LOC_ODSD") */
"CONNECTION_LOC_TGT_LOC_ODSD"."END_USER_CUST_ID" "END_USER_CUST_ID",
"SERVICE_LOC_TGT_LOC_ODSD"."SERVICE_NAME" "SERVICE_NAME",
"CONNECTION_LOC_TGT_LOC_ODSD"."CE_CLLI" "CE_CLLI",
"CONNECTION_LOC_TGT_LOC_ODSD"."PE_CLLI" "PE_CLLI"
FROM "ODS"."CONNECTION"@"ODSD"@"LOC_TGT_LOC_ODSD" "CONNECTION_LOC_TGT_LOC_ODSD"
FULL OUTER JOIN "ODS"."SERVICE"@"ODSD"@"LOC_TGT_LOC_ODSD" "SERVICE_LOC_TGT_LOC_ODSD" ON ("CONNECTION_LOC_TGT_LOC_ODSD"."END_USER_CUST_ID" = "SERVICE_LOC_TGT_LOC_ODSD"."END_USER_CUST_ID") ;
If I replace the Full outer join with an equi join everything works fine. The SQL generated with an equi-join is ---
SELECT
/*+ DRIVING_SITE("CONNECTION_LOC_TGT_LOC_ODSD") */
"CONNECTION_LOC_TGT_LOC_ODSD"."END_USER_CUST_ID" "END_USER_CUST_ID",
"SERVICE_LOC_TGT_LOC_ODSD"."SERVICE_NAME" "SERVICE_NAME",
"CONNECTION_LOC_TGT_LOC_ODSD"."CE_CLLI" "CE_CLLI",
"CONNECTION_LOC_TGT_LOC_ODSD"."PE_CLLI" "PE_CLLI"
FROM "ODS"."CONNECTION"@"ODSD"@"LOC_TGT_LOC_ODSD" "CONNECTION_LOC_TGT_LOC_ODSD",
"ODS"."SERVICE"@"ODSD"@"LOC_TGT_LOC_ODSD" "SERVICE_LOC_TGT_LOC_ODSD" WHERE ( "CONNECTION_LOC_TGT_LOC_ODSD"."END_USER_CUST_ID" = "SERVICE_LOC_TGT_LOC_ODSD"."END_USER_CUST_ID" );
We are using Oracle 9.2.0.4 AND OWB Clinet 9.2.0.2.8 and runtime repository 9.2.0.2.0.
Any help on this appreciated?The discussion on this thread has moved to the later thread Problem with JOINs
Nikolai
Maybe you are looking for
-
We have just moved from MobileMe, where we had a 'Family account' (and we each have our own @me.com email addresses) to iCloud. We share the Cal and Contacts on our iMac. How do we sync to multiple devices - we each have an iPad and an iPhone, but wi
-
Reversal of stock upload file:- Urgent
Gurus, By mistake at intial stock upload file is upladed twice, how could i reverse the same. I uploaded through T -code MB1C/ Mvt type 561; and showing at 998 storage type( interemediate bins). How could I will reverse the excess stock from
-
Printing Acrobat files with HP Color LaserJet 2605dtn
Often, but not every instance, when I print an Adobe Acrobat file on the HP Color LaserJet 2605dtn Printer the following happens: the text prints as expected but the entire text area (but not the margins) is painted over with an orange red. This happ
-
I am trying to figure out if iMatch is right for my family. We have 2 iPhones, 2 iPads, an iPod Touch, and a few PCs. One PC has our music library on it in iTunes. We want to all share from the library with our own separate devices. If we subscri
-
hello java fanatics! :D im a vb programmer and created an ActiveX Printer Control. this ActiveX is downloaded on the client browsers (IE) and called by my vbscript for me to access its functions. but my problem is that... it only works on IE! one of