Right Outer Join in OWB
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,
varsha
Hi
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
Similar Messages
-
Choice of left or right outer join
Hi Experts,
I have a two tables like named as emp demo
desc emp
empname varchar2(50)
empid number
desc demo
empname varchar2(50)
empid number
when i implement the below quries i'm getting the same o/p.
queries like
select e.ename from emp e left outer join demo d on (e.empid=d.empid);
select e.ename from demo d right outer join emp e on (d.empid=e.empid);
In this case which query is most prefer
Thnks in advance
HHi,
943338 wrote:
Hi Experts,
I have a two tables like named as emp demo
desc emp
empname varchar2(50)
empid number
desc demo
empname varchar2(50)
empid number
when i implement the below quries i'm getting the same o/p.Right. You're getting the same error, because there is no ename column. If you change ename to empname, then you'll still get the same results, because
x LEFT OUTER JOIN y ON zis equivalent to
y RIGHT OUTER JOIN x ON zin results and performance.
queries like
select e.ename from emp e left outer join demo d on (e.empid=d.empid);
select e.ename from demo d right outer join emp e on (d.empid=e.empid);
In this case which query is most preferBoth are equally efficient.
Since most people never use RIGHT OUTER JOIN, it might make maintenance eaiser if you don't use it, either. I would use LEFT OUTER JOIN. -
How to use left outer joins ,right outer joins and order by clause for belo
Hi,
How to use left outer joins ,right outer joins and order by clause for below XML query.
The query which is red colour returns null then its not displaying any values for columns in that tables. Tried decode, nvl function hasn't worked.
SELECT XMLAGG ( XMLELEMENT( "P", XMLFOREST( P.process_id AS Ppid,
(SELECT XMLAGG( XMLELEMENT( "PI", XMLFOREST( PI.question_id AS PIqid,
PI.process_id AS PIpid,
PI.innertext AS
PItext, PI.itemtype AS PItype,
PI.linkfrom AS PIfrom,
PI.linkto AS PIto,
PI.associated AS PIas,
PI.content_id AS PIc,
PI.exitpoint1_id AS PIe1,
PI.exitpoint2_id AS PIe2,
PI.exitpoint3_id AS PIe3,
PI.followoncall AS PIfoc,
PI.userinput AS PIui,
PI.resolveidentifier AS PIri,
PI.libquestion_idfk AS PIlqid,
PI.isLocked AS PIstls,
PI.PreviousAnswer AS PIPAns,
PI.VisibleToAgent AS PIVAgent,
PI.RetryAttempt AS PIRetry,
PI.Tags AS PITag,
SELECT XMLAGG( XMLELEMENT( "PO", XMLFOREST( PO.option_id AS POoid,
PO.question_id AS POqid,
PO.process_id AS popid,
PO.opt_innertext AS POtext,
PO.opt_linkfrom AS POfrom,
PO.opt_linkto AS POto,
PO.libquestion_idfk AS POlqid,
PO.liboption_idfk AS POloid ) ) )
FROM vw_liveProcessOption_Sim_v6 PO
WHERE PI.question_id = PO.question_id (+)
AND PI.process_id = PO.process_id (+)
) "A" ) ) ) AS "PO"
FROM vw_liveProcessItem_Sim_v6 PI
WHERE P.process_id = PI.process_id
) "A" ) ) ) AS "PI"
FROM liveProcess_ec P
WHERE (P.process_id = 450)
Any help really appreciated.
Thanksuser512743 wrote:
Hi,
Here below is the scripts of tables, insert statements and Required output.
CREATE TABLE VW_LIVEPROCESSOPTION_SIM_v6
( "OPTION_ID" NUMBER,
"QUESTION_ID" NUMBER(10,0),
"PROCESS_ID" NUMBER(10,0),
"OPT_INNERTEXT" VARCHAR2(200 CHAR),
"OPT_LINKFROM" VARCHAR2(20 CHAR),
"OPT_LINKTO" VARCHAR2(20 CHAR),
"LIBQUESTION_IDFK" NUMBER,
"LIBOPTION_IDFK" NUMBER
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,2,450,'Yes',null,'5',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,3,450,'Yes',null,'5',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,5,450,'Yes',null,'6',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,6,450,'Yes',null,'7',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,8,450,'Block All',null,'9',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,9,450,'Yes',null,'10',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,11,450,'Yes',null,'12',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,12,450,'Yes',null,'13',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,14,450,'Yes',null,'16',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,2,450,'No',null,'3',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,3,450,'No',null,'4',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,5,450,'No',null,'8',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,6,450,'No',null,'8',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,8,450,'Standard',null,'11',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,9,450,'No',null,'11',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,11,450,'No',null,'14',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,12,450,'No',null,'14',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,14,450,'No',null,'15',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (3,8,450,'Disabled',null,'12',null,null);
Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (4,8,450,'User Defined',null,'12',null,null);
REATE TABLE "VW_LIVEPROCESSITEM_SIM_v6"
( "QUESTION_ID" NUMBER(10,0),
"PROCESS_ID" NUMBER(10,0),
"INNERTEXT" VARCHAR2(200 CHAR),
"ITEMTYPE" VARCHAR2(50 CHAR),
"LINKFROM" VARCHAR2(500 CHAR),
"LINKTO" VARCHAR2(500 CHAR),
"ASSOCIATED" VARCHAR2(200 CHAR),
"CONTENT_ID" NUMBER,
"EXITPOINT1_ID" NUMBER(10,0),
"EXITPOINT2_ID" NUMBER(10,0),
"EXITPOINT3_ID" NUMBER(10,0),
"RESOLVEIDENTIFIER" VARCHAR2(40 CHAR),
"LIBQUESTION_IDFK" NUMBER(10,0),
"FOLLOWONCALL" NUMBER(1,0),
"USERINPUT" VARCHAR2(200 CHAR),
"ISLOCKED" NUMBER(1,0),
"PREVIOUSANSWER" NUMBER(1,0),
"VISIBLETOAGENT" NUMBER(1,0),
"RETRYATTEMPT" NUMBER(10,0),
"TAGS" VARCHAR2(50 BYTE)
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (1,450,'CBB1015 - Router Firewall Settinngs Process','Title',null,'2',null,null,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (2,450,'Is the customers PC Firewall turned off?','Question','1','2.2,2.1',null,null,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (3,450,'Advise the customer to turn off the PC Firewall in order to continue. Has this been done?','Question','2.2','3.2,3.1',null,278,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (4,450,'Advise the customer the PC Firewall must be switched off before this process????','ExitPoint','3.2',null,null,null,14,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (5,450,'Is the customer able to access the internet now?','Question','3.1,2.1','5.2,5.1',null,null,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (6,450,'Is the customer having a problem with a specific website?','Question','5.1','6.2,6.1',null,null,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (7,450,'1536: CBB1008 - Browser Setup and Daignostics','SubProcess','6.1',null,'1536-1-0',null,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (8,450,'What is the security level on the CPE Management page?','Question','6.2,5.2','8.4,8.3,8.2,8.1',null,279,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (9,450,'Change the security level to Standard. Does this resolve the customers issue?','Question','8.1','9.2,9.1',null,280,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (10,450,'Issue Resolved','ExitPoint','9.1',null,null,null,1,6,122,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (11,450,'Change the security level to Disabled. Is the customer able to browse the internet?','Question','9.2,8.2','11.2,11.1',null,281,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (12,450,'Change the security level to Standard. Is the customer able to browse the internet now?','Question','11.1,8.3,8.4','12.2,12.1',null,283,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (13,450,'Issue Resolved','ExitPoint','12.1',null,null,null,1,6,123,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (14,450,'Ask the customer to perform a master reset. Does this resolve their issue?','Question','12.2,11.2','14.2,14.1',null,282,null,null,null,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (15,450,'Faulty CPE','ExitPoint','14.2',null,null,null,1,6,124,null,null,null,null,null,null,null,null,null);
Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (16,450,'Issue Resolved','ExitPoint','14.1',null,null,null,1,6,123,null,null,null,null,null,null,null,null,null);
CREATE TABLE "LIVEPROCESS_EC_V"
( "PROCESS_ID" NUMBER(10,0),
"USER_ID" NUMBER(10,0),
"CREATED" TIMESTAMP (6)
Insert into LIVEPROCESS_EC (PROCESS_ID,USER_ID,CREATED) values (450,7460,to_timestamp('21-APR-08 09.34.41.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'));
Required O/P in XML format
<P>
<Ppid>450</Ppid>
<PI>
<PIqid>1</PIqid>
<PIpid>450</PIpid>
<PItext>CBB1015 - Router Firewall Settinngs Process</PItext>
<PItype>Title</PItype>
<PIto>2</PIto>
<PO />
</PI>
<PI>
<PIqid>2</PIqid>
<PIpid>450</PIpid>
<PItext>Is the customers PC Firewall turned off?</PItext>
<PItype>Question</PItype>
<PIfrom>1</PIfrom>
<PIto>2.2,2.1</PIto>
<PO>
<POoid>1</POoid>
<POqid>2</POqid>
<popid>450</popid>
<POtext>Yes</POtext>
<POto>5</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>2</POqid>
<popid>450</popid>
<POtext>No</POtext>
<POto>3</POto>
</PO>
</PI>
<PI>
<PIqid>3</PIqid>
<PIpid>450</PIpid>
<PItext>Advise the customer to turn off the PC Firewall in order to continue. Has this been done?</PItext>
<PItype>Question</PItype>
<PIfrom>2.2</PIfrom>
<PIto>3.2,3.1</PIto>
<PIc>278</PIc>
<PO>
<POoid>1</POoid>
<POqid>3</POqid>
<popid>450</popid>
<POtext>Yes</POtext>
<POto>5</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>3</POqid>
<popid>450</popid>
<POtext>No</POtext>
<POto>4</POto>
</PO>
</PI>
<PI>
<PIqid>4</PIqid>
<PIpid>450</PIpid>
<PItext>Advise the customer the PC Firewall must be switched off before this process????</PItext>
<PItype>ExitPoint</PItype>
<PIfrom>3.2</PIfrom>
<PIe1>14</PIe1>
<PO />
</PI>
<PI>
<PIqid>5</PIqid>
<PIpid>450</PIpid>
<PItext>Is the customer able to access the internet now?</PItext>
<PItype>Question</PItype>
<PIfrom>3.1,2.1</PIfrom>
<PIto>5.2,5.1</PIto>
<PO>
<POoid>1</POoid>
<POqid>5</POqid>
<popid>450</popid>
<POtext>Yes</POtext>
<POto>6</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>5</POqid>
<popid>450</popid>
<POtext>No</POtext>
<POto>8</POto>
</PO>
</PI>
<PI>
<PIqid>6</PIqid>
<PIpid>450</PIpid>
<PItext>Is the customer having a problem with a specific website?</PItext>
<PItype>Question</PItype>
<PIfrom>5.1</PIfrom>
<PIto>6.2,6.1</PIto>
<PO>
<POoid>1</POoid>
<POqid>6</POqid>
<popid>450</popid>
<POtext>Yes</POtext>
<POto>7</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>6</POqid>
<popid>450</popid>
<POtext>No</POtext>
<POto>8</POto>
</PO>
</PI>
<PI>
<PIqid>7</PIqid>
<PIpid>450</PIpid>
<PItext>1536: CBB1008 - Browser Setup and Daignostics</PItext>
<PItype>SubProcess</PItype>
<PIfrom>6.1</PIfrom>
<PIas>1536-1-0</PIas>
<PO />
</PI>
<PI>
<PIqid>8</PIqid>
<PIpid>450</PIpid>
<PItext>What is the security level on the CPE Management page?</PItext>
<PItype>Question</PItype>
<PIfrom>6.2,5.2</PIfrom>
<PIto>8.4,8.3,8.2,8.1</PIto>
<PIc>279</PIc>
<PO>
<POoid>1</POoid>
<POqid>8</POqid>
<popid>450</popid>
<POtext>Block All</POtext>
<POto>9</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>8</POqid>
<popid>450</popid>
<POtext>Standard</POtext>
<POto>11</POto>
</PO>
<PO>
<POoid>3</POoid>
<POqid>8</POqid>
<popid>450</popid>
<POtext>Disabled</POtext>
<POto>12</POto>
</PO>
<PO>
<POoid>4</POoid>
<POqid>8</POqid>
<popid>450</popid>
<POtext>User Defined</POtext>
<POto>12</POto>
</PO>
</PI>
<PI>
<PIqid>9</PIqid>
<PIpid>450</PIpid>
<PItext>Change the security level to Standard. Does this resolve the customers issue?</PItext>
<PItype>Question</PItype>
<PIfrom>8.1</PIfrom>
<PIto>9.2,9.1</PIto>
<PIc>280</PIc>
<PO>
<POoid>1</POoid>
<POqid>9</POqid>
<popid>450</popid>
<POtext>Yes</POtext>
<POto>10</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>9</POqid>
<popid>450</popid>
<POtext>No</POtext>
<POto>11</POto>
</PO>
</PI>
<PI>
<PIqid>10</PIqid>
<PIpid>450</PIpid>
<PItext>Issue Resolved</PItext>
<PItype>ExitPoint</PItype>
<PIfrom>9.1</PIfrom>
<PIe1>1</PIe1>
<PIe2>6</PIe2>
<PIe3>122</PIe3>
<PO />
</PI>
<PI>
<PIqid>11</PIqid>
<PIpid>450</PIpid>
<PItext>Change the security level to Disabled. Is the customer able to browse the internet?</PItext>
<PItype>Question</PItype>
<PIfrom>9.2,8.2</PIfrom>
<PIto>11.2,11.1</PIto>
<PIc>281</PIc>
<PO>
<POoid>1</POoid>
<POqid>11</POqid>
<popid>450</popid>
<POtext>Yes</POtext>
<POto>12</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>11</POqid>
<popid>450</popid>
<POtext>No</POtext>
<POto>14</POto>
</PO>
</PI>
<PI>
<PIqid>12</PIqid>
<PIpid>450</PIpid>
<PItext>Change the security level to Standard. Is the customer able to browse the internet now?</PItext>
<PItype>Question</PItype>
<PIfrom>11.1,8.3,8.4</PIfrom>
<PIto>12.2,12.1</PIto>
<PIc>283</PIc>
<PO>
<POoid>1</POoid>
<POqid>12</POqid>
<popid>450</popid>
<POtext>Yes</POtext>
<POto>13</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>12</POqid>
<popid>450</popid>
<POtext>No</POtext>
<POto>14</POto>
</PO>
</PI>
<PI>
<PIqid>13</PIqid>
<PIpid>450</PIpid>
<PItext>Issue Resolved</PItext>
<PItype>ExitPoint</PItype>
<PIfrom>12.1</PIfrom>
<PIe1>1</PIe1>
<PIe2>6</PIe2>
<PIe3>123</PIe3>
<PO />
</PI>
<PI>
<PIqid>14</PIqid>
<PIpid>450</PIpid>
<PItext>Ask the customer to perform a master reset. Does this resolve their issue?</PItext>
<PItype>Question</PItype>
<PIfrom>12.2,11.2</PIfrom>
<PIto>14.2,14.1</PIto>
<PIc>282</PIc>
<PO>
<POoid>1</POoid>
<POqid>14</POqid>
<popid>450</popid>
<POtext>Yes</POtext>
<POto>16</POto>
</PO>
<PO>
<POoid>2</POoid>
<POqid>14</POqid>
<popid>450</popid>
<POtext>No</POtext>
<POto>15</POto>
</PO>
</PI>
<PI>
<PIqid>15</PIqid>
<PIpid>450</PIpid>
<PItext>Faulty CPE</PItext>
<PItype>ExitPoint</PItype>
<PIfrom>14.2</PIfrom>
<PIe1>1</PIe1>
<PIe2>6</PIe2>
<PIe3>124</PIe3>
<PO />
</PI>
<PI>
<PIqid>16</PIqid>
<PIpid>450</PIpid>
<PItext>Issue Resolved</PItext>
<PItype>ExitPoint</PItype>
<PIfrom>14.1</PIfrom>
<PIe1>1</PIe1>
<PIe2>6</PIe2>
<PIe3>123</PIe3>
<PO />
</PI>
</P>
Thanks in advance
Edited by: user512743 on Nov 18, 2008 4:46 AM -
Unable to make a Right-Outer Join
Unable to implement the following Query in the WebI Report.
In Universe, I have all the 4 views and made the complex right outer join with the constraints from the query. However, i cannot have all the columns in the select clause in WebI Report as i can see queries are breaked up into 4 queries under synchronization folder. And unable to implement the custom query.
Note : There are no primary keys / column to identify unique row. However, combination of columns helps to identify the unique row which is used in join conditions.
How get a report based on the following query
SELECT aht."RESOURCE NAME",
aht.week,
aht.resource_key,
aht."WEEK END DATE",
Round(aht.aht,2),
Round(aht.att,2),
tnr."TNR%",
nr.nr_reason_time,
vw."Complaince",
vw."Rapport_Score",
vw."Solution_Score",
vw."Value_Score",
aht.group_combination_key
FROM (select * from GIM_AHT_ATT where WEEK in ( SELECT DISTINCT LABEL_YYYY_WE FROM DATE_TIME WHERE CAL_DATE BETWEEN (next_day(To_Date(@Prompt('Date:','D',,Mono,Free,Persistent,{'1/1/2011 12:00:00 AM'},User:2),'DD-MM-YYYY HH24:MI:SS'),'Saturday')-34) AND (next_day(To_Date(@Prompt('Date:','D',,Mono,Free,Persistent,{'1/1/2011 12:00:00 AM'},User:2),'DD-MM-YYYY HH24:MI:SS'),'Saturday')-7) ) and RESOURCE_KEY in (Select resource_key from resource_ where resource_type_code ='AGENT' and resource_name in @Prompt('Agent:','A','Activity\User Name',MULTI,CONSTRAINED,Persistent,{'ALL'},user:10))) aht
LEFT OUTER JOIN (Select * from Verint_wfm where Verint_wfm."Week_NUM" in ( SELECT DISTINCT LABEL_YYYY_WE FROM DATE_TIME WHERE CAL_DATE BETWEEN (next_day(To_Date(@Prompt('Date:','D',,Mono,Free,Persistent,{'1/1/2011 12:00:00 AM'},User:2),'DD-MM-YYYY HH24:MI:SS'),'Saturday')-34) AND (next_day(To_Date(@Prompt('Date:','D',,Mono,Free,Persistent,{'1/1/2011 12:00:00 AM'},User:2),'DD-MM-YYYY HH24:MI:SS'),'Saturday')-7) ) and
Verint_wfm."Resource_Key" in (Select resource_key from resource_ where resource_type_code ='AGENT' and resource_name in @Prompt('Agent:','A','Activity\User Name',MULTI,CONSTRAINED,Persistent,{'ALL'},user:10))) vw
ON (aht.week = vw."Week_NUM"
AND aht.resource_key = vw."Resource_Key" )
LEFT OUTER JOIN (Select * from GIM_TNR where GIM_TNR.WEEK in ( SELECT DISTINCT LABEL_YYYY_WE FROM DATE_TIME WHERE CAL_DATE BETWEEN (next_day(To_Date(@Prompt('Date:','D',,Mono,Free,Persistent,{'1/1/2011 12:00:00 AM'},User:2),'DD-MM-YYYY HH24:MI:SS'),'Saturday')-34) AND (next_day(To_Date(@Prompt('Date:','D',,Mono,Free,Persistent,{'1/1/2011 12:00:00 AM'},User:2),'DD-MM-YYYY HH24:MI:SS'),'Saturday')-7) ) and GIM_TNR.RESOURCE_KEY in (Select resource_key from resource_ where resource_type_code ='AGENT' and resource_name in @Prompt('Agent:','A','Activity\User Name',MULTI,CONSTRAINED,Persistent,{'ALL'},user:10))) tnr
ON (aht.week = tnr.week
AND aht.resource_key = tnr.resource_key
AND aht.group_combination_key = tnr."Group Combination Key" )
LEFT OUTER JOIN (Select * from GIM_NR_REASON where GIM_NR_REASON.LABEL_YYYY_WE in ( SELECT DISTINCT LABEL_YYYY_WE FROM DATE_TIME WHERE CAL_DATE BETWEEN (next_day(To_Date(@Prompt('Date:','D',,Mono,Free,Persistent,{'1/1/2011 12:00:00 AM'},User:2),'DD-MM-YYYY HH24:MI:SS'),'Saturday')-34) AND (next_day(To_Date(@Prompt('Date:','D',,Mono,Free,Persistent,{'1/1/2011 12:00:00 AM'},User:2),'DD-MM-YYYY HH24:MI:SS'),'Saturday')-7) ) and GIM_NR_REASON.RESOURCE_KEY in (Select resource_key from resource_ where resource_type_code ='AGENT' and resource_name in @Prompt('Agent:','A','Activity\User Name',MULTI,CONSTRAINED,Persistent,{'ALL'},user:10))) nr
ON(aht.week = nr.label_yyyy_we
AND aht.resource_key = nr.resource_key
AND aht.group_combination_key = nr."Group Combination Key" );In Unvierse Designer under File>Paramters>SQL Tab, all "Mutiple Path" options are unchecked?
Regards,
Bilahari M -
Could any one tell me how to do the left outer join or right outer join?
Could any one tell me how to do the left outer join or right outer join in Webi Rich Client? thanks.
we can do it in two ways
1. In web intelligence level on the query panel click the sql query and write the statement what ever u want there by modifying the existing statement.
2. In universe level select the fields in the two tables that you want to make join and create the join between two tables directly by joining field in table 1 to the field in the table 2 by drawing a line and double click on the line to view the join properties,then on join properties if we check the table 1 outer then it is left outer join if we check on table 2 outer then it will be the right outer join.after exporting the universe to the central sever we are now ready to use in web intelligence with out being changed anything in the sql query.
endorse me if it is useful.
thanks & regards
Sreekanth. -
Here is a query and desired output for a weekly sales report. The problem is that if no data exists for given businessdate, the report is empty. It should show store with zeroed totals.
NOTES:
1. storenbr must be string
2. bow, eow = beginning and end of week
3. I have no say-so on the date format
with report_stores as
( select 501 as storeid from dual union all
select 22 as storeid from dual union all
select 24 as storeid from dual
, store_details as
select 501 as storeid, '6504' as storenbr, 'Quincey Circle' as storename from dual union all
select 22 as storeid, '2385' as storenbr, 'Goodlet' as storename from dual union all
select 24 as storeid, '4290' as storenbr, 'Poplar' as storename from dual
, sales_data as
select 501 as storeid, to_date('12/01/2010', 'MM/DD/YYYY') as businessdate, 100 as sales_amt, 50 as guestcount from dual union all
select 22 as storeid, to_date('12/01/2010', 'MM/DD/YYYY') as businessdate, 200 as sales_amt, 50 as guestcount from dual union all
select 24 as storeid, to_date('12/01/2010', 'MM/DD/YYYY') as businessdate, 300 as sales_amt, 50 as guestcount from dual union all
select 501 as storeid, to_date('12/02/2010', 'MM/DD/YYYY') as businessdate, 400 as sales_amt, 100 as guestcount from dual union all
select 22 as storeid, to_date('12/02/2010', 'MM/DD/YYYY') as businessdate, 500 as sales_amt, 100 as guestcount from dual union all
select 24 as storeid, to_date('12/02/2010', 'MM/DD/YYYY') as businessdate, 600 as sales_amt, 100 as guestcount from dual
select storenbr
, to_date('01/30/2011', 'MM/DD/YYYY') as EOW
, sum(nvl(sales_amt, 0)) as sales_amount
, sum(nvl(sales.guestcount , 0)) as guestcount
from report_stores stores
inner join store_details details on details.storeid = stores.storeid
left outer join sales_data sales on sales.storeid = stores.storeid
and sales.businessdate between to_date('01/24/2011', 'MM/DD/YYYY') and to_date('01/30/2011', 'MM/DD/YYYY')
group by storename, to_date('01/30/2011', 'MM/DD/YYYY');However, when I make date dynamic by adding a dates table, I don't get output.
with report_dates as
select to_date('01/05/2011', 'MM/DD/YYYY') as businessdate, 'Wednesday' as day_name, 2 as week_nbr, to_date('01/03/2011', 'MM/DD/YYYY') as bow, to_date('01/09/2011', 'MM/DD/YYYY') as eow from dual union all
select to_date('01/24/2011', 'MM/DD/YYYY') as businessdate, 'Monday' as day_name, 5 as week_nbr, to_date('01/24/2011', 'MM/DD/YYYY') as bow, to_date('01/30/2011', 'MM/DD/YYYY') as eow from dual
, report_stores as
( select 501 as storeid from dual union all
select 22 as storeid from dual union all
select 24 as storeid from dual
, store_details as
select 501 as storeid, '6504' as storenbr, 'Quincey Circle' as storename from dual union all
select 22 as storeid, '2385' as storenbr, 'Goodlet' as storename from dual union all
select 24 as storeid, '4290' as storenbr, 'Poplar' as storename from dual
, sales_data as
select 501 as storeid, to_date('12/01/2010', 'MM/DD/YYYY') as businessdate, 100 as sales_amt, 50 as guestcount from dual union all
select 22 as storeid, to_date('12/01/2010', 'MM/DD/YYYY') as businessdate, 200 as sales_amt, 50 as guestcount from dual union all
select 24 as storeid, to_date('12/01/2010', 'MM/DD/YYYY') as businessdate, 300 as sales_amt, 50 as guestcount from dual union all
select 501 as storeid, to_date('12/02/2010', 'MM/DD/YYYY') as businessdate, 400 as sales_amt, 100 as guestcount from dual union all
select 22 as storeid, to_date('12/02/2010', 'MM/DD/YYYY') as businessdate, 500 as sales_amt, 100 as guestcount from dual union all
select 24 as storeid, to_date('12/02/2010', 'MM/DD/YYYY') as businessdate, 600 as sales_amt, 100 as guestcount from dual
select storenbr
, eow
, sum(nvl(sales_amt, 0)) as sales_amount
, sum(nvl(sales.guestcount , 0)) as guestcount
from report_stores stores
inner join store_details details on details.storeid = stores.storeid
right outer join sales_data sales on sales.storeid = stores.storeid
inner join report_dates dte on dte.businessdate = to_date('01/24/2010', 'MM/DD/YYYY')
-- and sales.businessdate between bow and eow
group by storenbr, eow
;What am I doing wrong? For kicks I also tried switching the JOINS like :
Select *
from sales_data sales
left outer join report_stores stores on stores.stoeid = sales.storeid but couldn't make this work either.Hi,
Thanks for posting the sample data in a useful form.
Don't forget to post the results you want to get from that data. Is this what you want?
STOR EOW SALES_AMOUNT GUESTCOUNT
6504 0 0
2385 0 0
4290 0 0If so, you want to inner-join sales_data and report_dates, and then outer-join that result set to report_stores.
Here's one way to do that:
SELECT details.storenbr
, dte.eow
, NVL (SUM (sales.sales_amt), 0) AS sales_amount
, NVL (SUM (sales.guestcount), 0) AS guestcount
FROM report_stores stores
INNER JOIN store_details details ON details.storeid = stores.storeid
LEFT OUTER JOIN ( sales_data sales
JOIN report_dates dte ON sales.businessdate BETWEEN dte.bow
AND dte.eow
) ON sales.storeid = stores.storeid
GROUP BY details.storenbr
, dte.eow
;As in your first query, you want the every row in report_stores to appear in the output, whether it matches anything in sales+dte or not, so you want to continue saying "FROM report_stores ... *LEFT* OUTER JOIN ...".
You'll notice that I changed
SUM (NVL (x, 0)) to
NVL (SUM (x), 0). Both give the same results, but, if you have 1000 rows, the former calls NVL 1000 times, but the latter only calls NVL once, so it's more efficient. -
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. -
I would like to know how i can rewrite this statement below in ANSI-92 standard:
SELECT A.COMMON_COL1, B.COMMON.COL2 FROM
TABLE_A.COMMON_COL1 A,
TABLE_B.COMMON_COL2 B
WHERE TABLE_A.COMMON_COL1(+) = TABLE_B.COMMON_COL2;Many Thanks.FROM table_a a JOIN table_b b ON a.fk=b.pk
or
FROM (SELECT fk, other_col FROM table_a) a
JOIN (SELECT pk, other_other_col FROM table_b) b ON a.fk = b.pk -
Join-types right & full outer join with Datasets
Hello
I use Crystal Reports XI Release 2 with ADO.NET Datasets as datasource. In the "Database-Expert" I try to set the "Link-Options". Unfortunately are the join-types "right outer join" and "full outer join" disabled.
- Is this because of the datasource Dataset?
- Is there e possibility to build the Dataset so I can use this two joins?
- If not, is it possible in a newer version?
Thanks, T.FitziHi
I think this is the problem. I don't connect directly to a database. My application (C#) provieds Crystal Report with a dataset. So all my data is in this dataset.
Are this joins in the new version stil disabled?
Regards, Thomas -
What is left join /right join / out join/ inner join/please give example!
what is left join /right join / out join/ inner join/please give example!
thanksMaybe these examples will give you an idea...
SQL> select * from t1;
ID
1
2
3
4
SQL> select * from t2;
ID
3
4
5
6
-- LEFT OUTER JOIN
SQL> select t1.id, t2.id
2 from t1 LEFT OUTER JOIN t2 ON (t1.id = t2.id);
ID ID
3 3
4 4
1
2
-- RIGHT OUTER JOIN
SQL> select t1.id, t2.id
2 from t1 RIGHT OUTER JOIN t2 ON (t1.id = t2.id);
ID ID
3 3
4 4
6
5
-- LEFT JOIN (SAME AS LEFT OUTER JOIN)
SQL> ed
Wrote file afiedt.buf
1 select t1.id, t2.id
2* from t1 LEFT JOIN t2 ON (t1.id = t2.id)
SQL> /
ID ID
3 3
4 4
1
2
-- RIGHT JOIN (SAME AS RIGHT OUTER JOIN)
SQL> ed
Wrote file afiedt.buf
1 select t1.id, t2.id
2* from t1 RIGHT JOIN t2 ON (t1.id = t2.id)
SQL> /
ID ID
3 3
4 4
6
5
-- INNER JOIN (REGULAR JOIN)
SQL> ed
Wrote file afiedt.buf
1 select t1.id, t2.id
2* from t1 INNER JOIN t2 ON (t1.id = t2.id)
SQL> /
ID ID
3 3
4 4
-- FULL OUTER JOIN
SQL> ed
Wrote file afiedt.buf
1 select t1.id, t2.id
2* from t1 FULL OUTER JOIN t2 ON (t1.id = t2.id)
SQL> /
ID ID
3 3
4 4
1
2
6
5
6 rows selected.
SQL> -
Left Outer Joining multiple tables to one source table FAILS with VLD-1511
Hi all,
Is it me, or is OWB unable to handle left outer joining 1 source table to multiple other tables?
I want to load a fact table so I have 1 source table with measures. This table must be outer joined to some dimensions that have their FK in the fact table.
The SQL statement would look like this (and is perfectly valid):
select ...
from input, dim1, dim2
where input.c1 = dim1.c1(+)
and input.c2 = dim2.c2(+);
I put the where clause in the joiner operator and validate, but that gives me message VLD-1511: A table may be outer joined to at most one other table.
Even splitting this up into one outer join per joiner still gives this message.
A search and look around on the forum and on metalink shows there are related issues (like bug 3334035). Seemingly creating a view is the work-around to use.....? (ie downgrading owb to a simple gui tool) }-;
Have other people experienced this problem of not being able to outer join one input table to multiple other tables?
Thanks,
EdI have had some feedback from Oracle. It turns out this has to do with 2 issues. Below I have pasted the text that Support gave me:
<---------- START QUOTE ---------->
RESEARCH
=========
Bug 3437036 KEY LOOKUP DOES NOT DETECT ORA-1417 IN VALIDATE/GENERATE STEP
Unpublished Bug 4211684 FORWARD PORT OF BUG 3437036
shows:
Some more development has been completed when this bug is fixed in Paris.
The following are the details:
1. If the join condition contains a full outer join such as
tab1.c (+) = tab2.c (+) and tab2.c (+) = tab3.c
then the new validations implemented for this bug do not apply since
in OWB, full outer join triggers generation of joins in ANSI syntax.
ANSI syntax does not have the original problem the base bug of this
bug reported.
2. If the join condition does not contain any full outer join condition,
then the join is generated in Oracle join syntax, which is subject two
several restrictions. The fix to this bug check two of the restrictions.
3. The first restriction in Oracle syntax is that the outer join operator
"(+)" can only directly be attached to a column name. If you attach it
to an expression, such as the following:
(tab1.c + 1) (+) = tab2.c
Then there will be an ORA-936 error at the time of mapping deployment.
For this case, I have added a validation message VLD-1512 to error out
this situation.
4. The second restriction in Oracle syntax is that a table can only be
outer joined to exactly one other table.
For example, this is an invalid join in Oracle syntax:
tab1.c (+) = tab2.c and tab1.d (+) = tab3.d
because tab1 is left outer joined to tab2 and tab3.
But note that the following is still valid in Oracle syntax:
tab1.c (+) = tab2.c and tab1.d = tab3.d (+)
because tab1 is left outer joined to tab2 and right outer joined to tab3.
So this latter case does not violate the restriction that "same oj" to
more than 1 table is not allowed.
If same oj to more than 1 table is specified in a join condition,
VLD-1511 will be issued, and the map is made invalid.
<---------- END QUOTE ---------->
OWB does a partial validation, ie not all access paths are (can be) checked. A full check is only done by the database itself. So some scenarios (like checking whether multiple tables are outer joined the correct way) are not checked, and in this case are flagged with an error (even though it is actually a correct scenario).
Seemingly this was not flagged with an error in earlier versions of OWB, so beware, OWB behaviour may change when upgrading...
Alternative solutions are (1) using key lookups, (2) using a view with all outer joins in there, (3) using intermediate result tables between the joins.
Hope this info helps some people prevent spending too much time on a false error message,
Ed -
How can we make an outer join (+) between 2 Queries
in the data model, i have 2 queries
i.e
Q_master and Q_detail
i want to make a data link between
these two queries and
also make an outer join between these
two queries(i.e. to display all the detail
records, whether they have details or not)
please reply is it possible ?
if yes then how?
plz write.
[email protected]
nullHello,
Left outer join behavior is what you get by default with a link between two queries in Reports.
If you want a full outer join behavior, you'll need to create a third query that selects the detail records that have no corresponding master, and also create an extra layout region to display them in as a default group left or group above won't pick up these extra records.
If you want right outer join behavior, you'll need to put in a summary in the master query that counts the rows in the detail, and then put in a format trigger in the master repeating frame that suppresses printing when there are no detail records. And you'll also need the third query and layout section as in the full outer join case.
Regards,
The Oracle Reports Team --skw -
Non-ANSI Outer Join Operator Issue (reposted due to text issues)
I am currently using Designer 11.5.0.0. Itu2019s XI Rel 2, but Iu2019m not sure what service pack. I have created several universes with outer joins against a SQL Server 2005 database, but when I try using them in a Crystal report, I get the following error:
Failed to retrieve date from the database. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server] The query uses non-ANSI outer join operators (u201C=u201D or u201C=u201D). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes.
Here is my ODBC DSN configuration:
Microsoft SQL Server ODBC Driver Version 03.85.1132
Data Source Name: FlexOPS
Data Source Description:
Server: dalsvrw031
Database: (Default)
Language: (Default)
Translate Character
Data: Yes
Log Long Running Queries: No
Log Driver Statistics: No
Use Integrated Security: No
Use Regional Settings: No
Prepared Statements Option: Drop temporary procedures on disconnect
Use Failover Server: No
Use ANSI Quoted Identifiers: Yes
Use ANSI Null, Paddings and Warnings: Yes
Data Encryption: No
Okay, so I understand what the issue is. It appears that the version of Designer that I am using does not default the ANSI92 parameter to u201CYesu201D. So all the outer joins I have created in each of my universe are using the old *= as the join operator. And apparently, the ODBC driver I am using is not very happy with that.
As I understand it from what Iu2019ve read on other sites, I have the following options:
1) Set the ANSI92 parameter to Yes, drop all my joins, close and re-open Designer, and recreate all of the joins.
2) Find a different driver or connectivity method that will support non-ANSI joins.
3) Set my database back to SQL 2000 compatibility.
Option 1 is unappealing as it will cause a lot of time redoing all the work that Iu2019ve spent the past month doing. Option 2 is only a band-aid fix at best. Option 3 really isnu2019t an option for us.So I am wondering what other options I have to change these non-ANSI joins to ANSI compatible joins. Do I need to update Designer with a service pack? Is there a script out there that will automatically do this in each of the universes? I would appreciate any suggestions or guidance on this.
Thanks,
Lee -
Non-ANSI Outer Join Operator Issue
I am currently using Designer 11.5.0.0. Itu2019s XI Rel 2, but Iu2019m not sure what service pack. I have created several universes with outer joins against a SQL Server 2005 database, but when I try using them in a Crystal report, I get the following error:
Failed to retrieve date from the database.
Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server] The query uses non-ANSI outer join operators (u201C=u201D or u201C=u201D). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes.
Here is my ODBC DSN configuration:
Microsoft SQL Server ODBC Driver Version 03.85.1132
Data Source Name: FlexOPS
Data Source Description:
Server: dalsvrw031
Database: (Default)
Language: (Default)
Translate Character Data: Yes
Log Long Running Queries: No
Log Driver Statistics: No
Use Integrated Security: No
Use Regional Settings: No
Prepared Statements Option: Drop temporary procedures on disconnect
Use Failover Server: No
Use ANSI Quoted Identifiers: Yes
Use ANSI Null, Paddings and Warnings: Yes
Data Encryption: No
Okay, so I understand what the issue is. It appears that the version of Designer that I am using does not default the ANSI92 parameter to u201CYesu201D. So all the outer joins I have created in each of my universe are using the old *= as the join operator. And apparently, the ODBC driver I am using is not very happy with that.
As I understand it from what Iu2019ve read on other sites, I have the following options:
1) Set the ANSI92 parameter to Yes, drop all my joins, close and re-open Designer, and recreate all of the joins.
2) Find a different driver or connectivity method that will support non-ANSI joins.
3) Set my database back to SQL 2000 compatibility.
Option 1 is unappealing as it will cause a lot of time redoing all the work that Iu2019ve spent the past month doing. Option 2 is only a band-aid fix at best. Option 3 really isnu2019t an option for us.
So I am wondering what other options I have to change these non-ANSI joins to ANSI compatible joins. Do I need to update Designer with a service pack? Is there a script out there that will automatically do this in each of the universes?
I would appreciate any suggestions or guidance on this.
Thanks,
Lee
Edited by: Lee Vance on Jul 6, 2009 10:02 PMHi,
try the following:
open your universe in the Universe designer, go to File->Parameter, select the Parameter tab and change the value of the ANSI92 parameter from No to Yes.
Regards,
Stratos -
Oracle OUTER JOIN on more than one table
Hi!
Friends, please help with this urgent problem: How can an outer join be written on more than one table?
An SQL Server query:
SELECT * from a INNER JOIN b on a.id = b.id LEFT OUTER JOIN c ON c.id = a.id AND c.id = b.id
works fine with SQL SERVER
But Oracle query:
SELECT * from a,b,c WHERE a.id = b.id AND a.id = c.id (+) AND b.id = c.id (+)
gives an error: OUTER JOIN cannot be used on more than one table? Why?
I use OracleDriver from classes12.zip to connect to Oracle8i database.
Please, help!The Oracle 8i and later SQL reference reads that the following "join_types" are supported and under this syntax it does not limit the LEFT OUTER JOIN (syntax the same as SQLServer example in original note) to two tables as implied in these notes:
The join_type indicates the kind of join being performed:
Specify INNER to indicate explicitly that an inner join is being performed. This is the default.
Specify RIGHT to indicate a right outer join.
Specify LEFT to indicate a left outer join.
Specify FULL to indicate a full or two-sided outer join. In addition to the inner join, rows from both tables that have not been returned in the result of the inner join will be preserved and extended with nulls.
You can specify the optional OUTER keyword following RIGHT, LEFT, or FULL to explicitly clarify that an outer join is being performed.
Maybe you are looking for
-
Command line parameters for al_engine.exe
If you go to a command line window on a DS server and type al_engine.exe with no parameters it prints "Usage" information. Some of the parameters it mentions are known to the community (like -XX, -XI, etc). However there are some which sound pretty
-
760GM-E51 having onboard VGA problems
I got this motherboard as part of a barebones kit from TigerDirect. http://www.tigerdirect.com/applications/SearchTools/item-details.asp?EdpNo=1706926&CatId=5294 I already knew that the PSU was going to be an issue but figured I could at least get it
-
Help again with album art pleaseeeee
so i did what btabz said unchecked album art. pressed ok checked it again pressed ok but then i got an error message that said it couldn't do it. i also have my ipod set to manually update. so when i clicked the check back to auto update. pretty much
-
Pricing condition P100 - Intracompany STO
Hi all, Anyone can shed a light on how the pricing condition type P100 is used for STO plant-to-plant (intracompany) transfer? thanks
-
Free anti-virus ware for macbook?
Can anybody recommend a good anti-virus program for my macbook air, i've surfed the net but theres so much conflicting advice and i'm no expert, help!