Join with another table in pre-query
Hi,
We have a large data block and we need to order some columns based on street name for example, not id. The base table of db block contains an id_street column, and 'streets' table contains id and name.
Ok, in pre-query trigger of that block, we have a complex logic and we dynamically build the where clause. At the end, we set the order_By clause of the block, to order the rows, for example we need to order by the 'my_date' column asc (it's a date type column), and street desc; but street NAME, not id. We don't want to use a from clause query, because the dynamically where clause logic it's complex.
How can we join the db block table with 'streets' table in pre-query, so when constructing the order by clause to specify something like
set_block_property('ADRESE_NEZONATE', order_by, 'my_date, name desc');where 'name' is the name of the street, from the 'streets' table.
Is it possible in pre-query, somehow? Or, in my case where can I join with that table and use that column in pre-query at setting order by?
Thanks!
Edited by: Roger25 on 26.04.2013 12:31
I understand what you say but partially.. please explain in more detail how to do that;
How should look the adrese_nezonate block, then? I have to add a 'name' column and set copy value from item property to 'STREETS.NAME', and database_property No?
Then the post-query trigger how should look like (the order by clause)? The post-query sends the entire query (with where/order by clauses) to the server, but in that "select... where... order by" (built dynamically) there are only columns from that block (adrese_nezonate). I need to join with streets, INSIDE that query.
Thanks.
Similar Messages
-
Maximum number of tables that can be outer joined with one table in a query
Hi All,
Iam new to sql, so can you please let me know What is the maximum number of tables that can be outer joined with one table in a query?
Thanks,
Srinisrinu2 wrote:
Iam new to sql, so can you please let me know What is the maximum number of tables that can be outer joined with one table in a query?
There is no limit to the number of tables you can outer join as long as you join them correctly.
SQL> with a as
2 (
3 select 1 id, 2 b_key, 3 c_key from dual union all
4 select 2 id, 1 b_key, 4 c_key from dual union all
5 select 3 id, 3 b_key, 1 c_key from dual union all
6 select 4 id, 4 b_key, 2 c_key from dual
7 ),
8 b as
9 (
10 select 1 id, 1 c_key2 from dual union all
11 select 2 id, 5 c_key2 from dual union all
12 select 3 id, 3 c_key2 from dual union all
13 select 4 id, 2 c_key2 from dual
14 ),
15 c as
16 (
17 select 1 key1, 1 key2, '1-1' dta from dual union all
18 select 1 key1, 2 key2, '1-2' dta from dual union all
19 select 1 key1, 3 key2, '1-3' dta from dual union all
20 select 1 key1, 4 key2, '1-4' dta from dual union all
21 select 2 key1, 1 key2, '2-1' dta from dual union all
22 select 2 key1, 2 key2, '2-2' dta from dual union all
23 select 2 key1, 3 key2, '2-3' dta from dual union all
24 select 2 key1, 4 key2, '2-4' dta from dual union all
25 select 3 key1, 1 key2, '3-1' dta from dual union all
26 select 3 key1, 2 key2, '3-2' dta from dual union all
27 select 3 key1, 3 key2, '3-3' dta from dual union all
28 select 3 key1, 4 key2, '3-4' dta from dual union all
29 select 4 key1, 1 key2, '4-1' dta from dual union all
30 select 4 key1, 2 key2, '4-2' dta from dual union all
31 select 4 key1, 3 key2, '4-3' dta from dual union all
32 select 4 key1, 4 key2, '4-4' dta from dual
33 )
34 select d.a_id, d.b_id, c.key1 as c_key1, c.key2 as c_key3, c.dta
35 from
36 c,
37 (
38 select
39 a.id as a_id, b.id as b_id, a.c_key, b.c_key2
40 from a, b
41 where a.b_key = b.id
42 ) d
43 where d.c_key = c.key1 (+)
44 and d.c_key2 = c.key2 (+);
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> -
Update Problem - Join With Another Table
I'm trying to convert few MS Access Queries into Oracle. Following is one of the query from MS Access.
<font face="courier">
UPDATE [RESULT] INNER JOIN [MASTER]
ON ([RESULT].[LAST_NAME] = [MASTER].[LAST_NAME])
AND ([RESULT].[FIRST_NAME] = [MASTER].[FIRST_NAME])
AND ([RESULT].[DOCUMENT_NUMBER] = [MASTER].[DOCUMENT_NUMBER])
AND ([RESULT].[BATCH_ID] = [MASTER].[LEAD_ID])
SET [MASTER].[CLOSURE_REASON] = "Closed For Name and Document Number Match",
[MASTER].[RESULT_ID] = [RESULT].[ID],
[MASTER].[RESULT_PID] = [RESULT].[PID]
WHERE (([MASTER].[CLOSURE_REASON] Is Null)
AND ([MASTER].[REC_CODE] = "A1")
AND ([RESULT].[EVENT_DATE] = [MASTER].[EVENT_DATE])
AND ([RESULT].[EVENT_TYPE] = "Open")
AND ([MASTER].[DOCUMENT_NUMBER] Is Not Null)
AND ([MASTER].[DOCUMENT_NUMBER)] "null"));
</font>
First I received ORA-01779: cannot modify a column which maps to a non key-preserved table Error. I followed different examples (including MERGE) from your
site and modified my original query. Now, I receive ORA-30926: unable to get a stable set of rows in the source tables Error.
Most of the examples showed only one join between the tables but I have to make more joins based on my requirements.
Any help translating this query in to Oracle would be Great. Thanks!Assuming that the columns you are joining to in the result table are the whole PK or are declared as aunique contraint (i.e. some combination of last_name, first_name, document_number, batch_id, event_date, id, and pid make up the entire PK/unique constraint), then the updateable join view should look something like:
update (select m.last_name, m.first_name, m.document_number, m.lead_id,
m.closure_reason, m.result_id, r.id, m.result_pid, r.pid
from master m
join result r
on r.last_name = m.last_name and
r.first_name = m.first_name and
r.document_number = m.document_number and
r.batch_id = m.lead_id and
r.event_date = m.event_date
where m.closure_reason is null and
m.rec_code = 'A1' and
r.event_type = 'Open' and
m.document_number is not null and
m.document_number != 'null')
set closure_reason = 'Closed For Name and Document Number Match',
result_id = id,
result_pid = pidThe merge version would look something like:
merge into master
using (select last_name, first_name, document_number, batch_id,
event_date, id, pid
from result
where event_type = 'Open') r
on (r.last_name = m.last_name and
r.first_name = m.first_name and
r.document_number = m.document_number and
r.batch_id = m.lead_id and
r.event_date = m.event_date)
when mathed then
update
set closure_reason = 'Closed For Name and Document Number Match',
result_id = id,
result_pid = pid
where m.closure_reason is null and
m.rec_code = 'A1' and
m.document_number is not null and
m.document_number != 'null';However, as Hoek pointed out, the combination of last_name, first_name, document_number, batch_id, event_date, id, and pid must point to a unique row in the result table, whether they make up the PK or a unique constraint. If there are, or could be, multiple rows for a particular combination of last_name, first_name, document_number, batch_id, event_date, id, and pid, then you will need to find a way to determine which of those rows should be used to do the update.
John -
Case statement resulting into Left outer join with other tables
Hi All ,
I am facing a stuation where a Case statement on one of the logical columns in Answers is resulting into a left outer join with a table in the query.
If we remove the case stmt, the table is not being acessed.
The case stmt is a simple one and no other logical column is being accessed in the case stmt.
Please advice .
Thanks.Hi Sai,
No ..we dont have any left outer join ...its just that I am selecting measure from F1 which has a confimred dimension D1 with F2.Now when I dont have case stmt on measure from F1(Case stmt is something like : CASE WHEN "- P table"."P Column" = 'Y' THEN 'Right' ELSE 'Wrong' END), then it doesnt query F2.
However as soon as I introduce the case stmt ,the query creates a left outer join with F2.
Thanks. -
Can we join two totals tables in ABAP Query
Hey Gurus!
Can we join two totals tables in ABAP query.
I am tyring to join FAGFLEXT with internal orders totals table.
Thanks
SHi,
Report painter majorily operates around characteristics and key figures.
ABAP query comes even more handy. The advantage is -
1. You can link many tables
2. Create selection screen as you like to have
3. User friendly report creation
4. Logic can also be coded.
5. Authorization can be set
I have written a article in SDN, which gives you an idea as to how to go about using ABAP query. Have a look on this - [Article - Practical Usage of ABAP Query|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f6b256-23be-2b10-8b93-cad83a617634]
Regards,
Sridevi -
Avoid duplicates when i join with bridge table
i have a requirement with many to many relations between fact and dimention,that is the reason we have created bridge tables in the database.
if i execute only query on the fact table it is giving correct results.when ever i join with bridge tables it is returning lot of duplicate records.
Ex:
select amount from fact where column = 'xyz'
100
then it is returing one record.(this value is correct)
when ever i join this fact table with bridge table then it is returning duplicate records.
select a.amount from fact inner join bridge table b on a.fk=b.fk
100
100
100
100
100
how many number of fk's associated that many 100's are generating
in this case it is returning duplicate records.
in the RPD i have joined like one to many between fact to dimention.
if anybody face this type of situation please let me know how to resolve this?(FYI...i would have to do this before BM..because lot of other thing are coming into picture on BMM that's why i should have to achieve this in either physical or in database.
Thanks in advance
Edited by: user12077461 on Apr 3, 2011 6:39 PM
Edited by: user12077461 on Apr 17, 2011 4:51 PMI understand what you say but partially.. please explain in more detail how to do that;
How should look the adrese_nezonate block, then? I have to add a 'name' column and set copy value from item property to 'STREETS.NAME', and database_property No?
Then the post-query trigger how should look like (the order by clause)? The post-query sends the entire query (with where/order by clauses) to the server, but in that "select... where... order by" (built dynamically) there are only columns from that block (adrese_nezonate). I need to join with streets, INSIDE that query.
Thanks. -
Adding a single table without a logical join to another table (OBIEE 10g)
Sometimes I want to just display a single table without a logical join to another table in the repository. However, everytime I move it to the Business Model and Mapping layer and perform a Global Consistency Check, it tells me that it needs a logical join and I am forced to create another table to join to it. Thus creating a dimension-fact relationship. There are times I don't need this relationship and just want to display some data. Is there anyway to get around this?
Thanks in advance!Yes,You have to create a join.You cannot take single table to BMM layer.You can create an alias of the table.Join this alias and base table through any common column and take both tables to BMM and desired table to presentation layer.
Another way is to create a view in physcial layer.Write a select statement like
Select primary_key from Table
Where primary_key is primary key of base table.Join this view ith base table and repeat the steps defined for Alias.
Regards,
Sandeep -
ANSI Standard Join with Nested Table
Does anyone know how to (or whether you actually can) use ansi standard table joins with nested tables.
Non-ansi standard would look something like this
SELECT e.empno
FROM departments d, TABLE(d.employees) e
WHERE d.deptno = 10;
Where d.employees is a nested table.
But if I try ansi-standard I like such:
SELECT e.empno
FROM departments d
JOIN TABLE(d.employees) e
WHERE d.deptno = 10;
I get
ORA-00905: missing keyword
because I have nothing to join it on.
Your help is very much appreciatedBoth replies worked fine.
I think I will go with the NATURAL JOIN as it seems the cleanest option.
Thanks Guru 2748 -
Copy the structure of a table to another with another table name.
how to copy the structure of a table to another with another table name.
ie. i want a emp table with same values/structure to be copied to another table called my_employee.
how can this be done?create table my_emp as select * from emp;
If you do not want the data to be copied then do the following:
create table my_emp as select * from emp
where 1=2;
Avanti. -
Where clause with XMLExists and join on another table
Hi,
We have table like:
drop table xml_tbl;
create table xml_tbl (
xml_msg_id integer,
xml_msg_text xmltype
insert into xml_tbl values
(1, '<main><id>1</id></main>') ;
insert into xml_tbl values --(xml_msg_id,xml_msg_text)
(1, '<main><id>2</id></main>') ;
Another table like:
create Table Table1
( id1 int);
Insert into Table1 values(2);
Insert into Table1 values(3);
We need to have a view on top of the table xml_tbl where /main/id should have only those values which are in id1 column of table Table1.
Something like
CREATE OR REPLACE VIEW V_xml_tbl
xml_msg_text
AS
SELECT T.xml_msg_text
FROM xml_tbl T
WHERE XMLEXISTS (
'declare namespace Namesp1 ="Abc:Set";
let $Results as xs:boolean := fn:exists($p/main/id in (Select id1 from Table1)) --Now here I know I can't do Select id1 from
Table1*
return if ($Results ) then true() else ()'
PASSING T.xml_msg_text AS "p");
Actually in the real scenario Table1 will have many IDs and xml_tbl has many XML files..
So I am stuck on how to do it. Please help.
Thanks..
Edited by: user8941550 on Nov 20, 2012 7:19 PMOne of these two :
SQL> select t.xml_msg_text
2 from xml_tbl t
3 where exists (
4 select null
5 from table1 t1
6 where t1.id1 = xmlcast(
7 xmlquery('/main/id' passing t.xml_msg_text returning content)
8 as integer
9 )
10 );
XML_MSG_TEXT
<main>
<id>2</id>
</main>
SQL> select t.xml_msg_text
2 from xml_tbl t
3 , xmltable('/main' passing t.xml_msg_text
4 columns id integer path 'id'
5 ) x
6 where exists (
7 select null
8 from table1 t1
9 where t1.id1 = x.id
10 );
XML_MSG_TEXT
<main>
<id>2</id>
</main>
And a third one, using XMLExists :
SQL> select t.xml_msg_text
2 from xml_tbl t
3 where xmlexists (
4 'fn:collection("oradb:/DEV/TABLE1")/ROW[ID1=$d/main/id]'
5 passing t.xml_msg_text as "d"
6 );
XML_MSG_TEXT
<main>
<id>2</id>
</main>
Execution Plan
Plan hash value: 3633580934
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 2 | 116 | 8 (0)| 00:00:01 |
|* 1 | FILTER | | | | | |
| 2 | TABLE ACCESS FULL | XML_TBL | 2 | 116 | 3 (0)| 00:00:01 |
| 3 | NESTED LOOPS | | 1 | 5 | 5 (0)| 00:00:01 |
| 4 | TABLE ACCESS FULL| TABLE1 | 2 | 6 | 3 (0)| 00:00:01 |
|* 5 | XPATH EVALUATION | | | | | |
Predicate Information (identified by operation id):
1 - filter( EXISTS (SELECT 0 FROM "DEV"."TABLE1"
"SYS_ORAVW_2",XPATHTABLE('/main/id' PASSING :B1 COLUMNS "C_00$" XMLTYPE
PATH '.', "C_01$" XQEXVAL CHAR PATH '.') "P" WHERE
TO_BINARY_DOUBLE("ID1")=TO_BINARY_DOUBLE("P"."C_01$")))
5 - filter(TO_BINARY_DOUBLE("ID1")=TO_BINARY_DOUBLE("P"."C_01$"))The plan is similar to that of the second query above (XMLTable/EXISTS).
Still using XMLExists, a plan similar to the first query (EXISTS/XMLCast/XMLQuery) can be achieved by casting id to an integer datatype :
SQL> select t.xml_msg_text
2 from xml_tbl t
3 where xmlexists (
4 'fn:collection("oradb:/DEV/TABLE1")/ROW[ID1=xs:int($d/main/id)]'
5 passing t.xml_msg_text as "d"
6 );
XML_MSG_TEXT
<main>
<id>2</id>
</main>
Execution Plan
Plan hash value: 1149640166
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 61 | 7 (15)| 00:00:01 |
|* 1 | HASH JOIN SEMI | | 1 | 61 | 7 (15)| 00:00:01 |
| 2 | TABLE ACCESS FULL| XML_TBL | 2 | 116 | 3 (0)| 00:00:01 |
| 3 | TABLE ACCESS FULL| TABLE1 | 2 | 6 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - access("ID1"=SYS_XQ_ATOMCNVCHK(TO_NUMBER(SYS_XQ_UPKXML2SQL(SYS_XQ
EXVAL(SYS_XQEXTRACT(SYS_MAKEXML(0,"T"."SYS_NC00003$"),'/main/id'),1,50,3
3792,8192),50,1,0)),2,37))
Note
- Unoptimized XML construct detected (enable XMLOptimizationCheck for more information)Check each one on your real scenario to see which show best performance.
(I would tend to say the ones involving streaming evaluation)
Edited by: odie_63 on 5 nov. 2012 12:24
Edited by: odie_63 on 5 nov. 2012 12:38 -
Records getting multiplied by a factor of 3 when joining with other table
When i query a table association_1 records for a particular network element i get 7 records
but join it with rtts_association table to get the rtts_no i m getting 21 records.....
the problems is ... 7 records are getting multiplied by a factor of 3 resulting in 21 records ....
how can i avoid these extra records that appear in the second query
SQL> select raised,cleared from association_1 where ne ='30434000/1MU';
RAISED CLEARED
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15
12-FEB-2011 06:27:18 12-FEB-2011 06:29:51
21-FEB-2011 21:36:44 22-FEB-2011 10:23:06
23-FEB-2011 01:08:44 23-FEB-2011 06:56:53
23-FEB-2011 17:06:16 23-FEB-2011 19:55:19
23-FEB-2011 20:37:22 23-FEB-2011 23:01:21
24-FEB-2011 00:33:17 24-FEB-2011 02:03:26
SQL> select a.raised,a.cleared,b.rtts from association_1 a, rtts_association b where a.ne=b.ne and a.ne='30434000/1MU';
RAISED CLEARED RTTS
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15 1490980
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15 1487697
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15 1487649
12-FEB-2011 06:27:18 12-FEB-2011 06:29:51 1490980
12-FEB-2011 06:27:18 12-FEB-2011 06:29:51 1487697
12-FEB-2011 06:27:18 12-FEB-2011 06:29:51 1487649
21-FEB-2011 21:36:44 22-FEB-2011 10:23:06 1490980
21-FEB-2011 21:36:44 22-FEB-2011 10:23:06 1487697
21-FEB-2011 21:36:44 22-FEB-2011 10:23:06 1487649
23-FEB-2011 01:08:44 23-FEB-2011 06:56:53 1490980
23-FEB-2011 01:08:44 23-FEB-2011 06:56:53 1487697
RAISED CLEARED RTTS
23-FEB-2011 01:08:44 23-FEB-2011 06:56:53 1487649
23-FEB-2011 17:06:16 23-FEB-2011 19:55:19 1490980
23-FEB-2011 17:06:16 23-FEB-2011 19:55:19 1487697
23-FEB-2011 17:06:16 23-FEB-2011 19:55:19 1487649
23-FEB-2011 20:37:22 23-FEB-2011 23:01:21 1490980
23-FEB-2011 20:37:22 23-FEB-2011 23:01:21 1487697
23-FEB-2011 20:37:22 23-FEB-2011 23:01:21 1487649
24-FEB-2011 00:33:17 24-FEB-2011 02:03:26 1490980
24-FEB-2011 00:33:17 24-FEB-2011 02:03:26 1487697
24-FEB-2011 00:33:17 24-FEB-2011 02:03:26 1487649
21 rows selected.For every combination of raised & cleared columns in "association_1" table, there are 3 records in the "rtts_association" table with different values for "RTTS" as below:
Association_1:
RAISED CLEARED
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15
rtts_association
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15 1490980
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15 1487697
03-FEB-2011 22:03:10 03-FEB-2011 22:06:15 1487649Hence, evidently you wil get 7 (association_1) * 3 (rtts_association) in your output. If you want only one record in the output, you may need to pick any one of the values of RTTS from the 3 different values based on a pre-defined condition (e.g. record corresponding to lowest or highest value of RTTS)
Cheers -- -
Right way to preserve all parent table entries in a join with many tables!!
This problem is quite interesting to me. I have asked this question to others but no body is able to provide me with proper answers.
The problem is: How do I join a huge parent table with many child tables (more than 5 child tables) preserving all of the parent table entries. Lets say there is the parent table parentTable and three child tables childTable1, childTable2, childTable3. In order to get the data after joining these tables the query that I have been using was:
select parent.field1, parent.field2, parent.field3, child1.field4, child1.field5, child2.field6, child3.field7 from ParentTable parent, childTable1 child1, childTable1 child2, childTable3 child3 where parent.fielda = child1.fieldb and parent.fieldc = child.fieldd and parent.fielde = child.fieldf.
Although the tables are huge (more than 100,000 entries), this query is very fast, however those parent table entries which do not have child entries are lost. I know that I can left join a parent table with a child table and then with the next child table and then with the next child table and continue. Isn't there a simple solution for this commonly happening problem?
Please provide suggestions please...Hello Lakshmi,
Although I do not know exactly how to achieve what you want to achieve but I have seen DBAs/ABAPers in my experience can run queries/scripts using the COUNT function to give the actual number of line items per table for all your 100 or odd tables.
Rgds
CONMJI -
Outer join with effective date in peoplesoft query
Hi,
I'm trying to join two tables using outer join. Both tables are effective dated:
Dept_Tbl: dept_id, status, effdt
Tips_Tbl: dept_id, tips_id, effdt
Not all records in Dept_Tbl are in Tips_Tbl. I need to get all active depts and their most recent tips_id if they have one.
select a.dept_id, b.tips_id
from dept_tbl a, tips_tbl b
where a.status = 'Active'
and a.effdt =
(select max(a_ed.effdt) from dept_tbl a_ed
where a.dept_id = a_ed.dept_id
and a_ed.effdt <= SYSDATE)
and b.dept_id(+) = a.dept_id
and b.effdt =
(select max(b_ed.effdt) from tips_tbl b_ed
where b.dept_id = b_ed.dept_id
and b.tips_id = b_ed.tips_id
and b_ed.effdt <= SYSDATE)
The query only returns records that are in both tables.
Is there a way for outer join to work with effective dates?
Thanks in advance,
RegHere is an example of one solution. Note the use of NVL on both sides of the equal sign since both sides could be NULL in the case of the outer join
with dept_tbl as (select 1 dept_id, SYSDATE effdt FROM DUAL),
tips_tbl as (select 1 dept_id, NULL effdt FROM DUAL)
select a.effdt
from dept_tbl a,
tips_tbl b
where b.dept_id(+) = a.dept_id
and NVL(b.effdt, SYSDATE) = NVL((select max(b_ed.effdt)
from tips_tbl b_ed
where b.dept_id = b_ed.dept_id
and b_ed.effdt <= SYSDATE), SYSDATE);
EFFDT
5/7/2007 3:25:00 PM -
Self join with fact table in Obie 10G
I am a newbie to obiee.I have a development requirement as follows-
I need to find supervisors designation with the existing star RPD design. explanation is below
DIM_Designation(Desig_Wid)
|(Row_wid)
|
DIM_EMPLOYEE--------WORKER_FACT------------DIM_Supervisor
(Row_Wid)-----------------(Employee_Wid)
(Supervisor_Wid)------------(Row_Wid)
3 dimension is joined to fact to get employee, his supervisor and designation of employee. now i want to get the supervisor's designation? how is it possible? already employee and supervisor dimension is same W_employee_d table joined with fact as alias DIM_EMPLOYEE and DIM_SUPERVISOR. how to do self join with fact to get supervisor's designation. i do not have any supervisor_desig_wid in fact table. any help is deeply appreciated.Yes,Duplicate the fact table create a primary key on the newly fact table alias dimension table.So you can ur data modelling as usual.
-
How to union mulitple itemset column with another tables
Hi ,
i have the following table called itemset as below ,
A
;1;10;2;3;4;5;7;8
;10;2;3;4;5;8;9
;10;2;3;4;8;9
and another table called temp as below ,
B
1
2
6
and need to find the union of those 2 tables as below ,
A---------------------| B--| A Union B
;1;10;2;3;4;5;7;8 | 1 |;1;10;2;3;4;5;7;8
;1;10;2;3;4;5;7;8 | 2 |;1;10;2;3;4;5;7;8
;1;10;2;3;4;5;7;8 | 6 |;1;10;2;3;4;5;7;8;6
;10;2;3;4;5;8;9 |1 |;10;2;3;4;5;8;9;1
;10;2;3;4;5;8;9 |2 |;10;2;3;4;5;8;9
;10;2;3;4;5;8;9 |6 |;10;2;3;4;5;8;9;6
;10;2;3;4;8;9 |1 |;10;2;3;4;8;9;1
;10;2;3;4;8;9 |2 |;10;2;3;4;8;9
;10;2;3;4;8;9 |6 |;10;2;3;4;8;9;6
any help please ,
Edited by: user11309581 on Jun 26, 2011 10:43 PM
Edited by: user11309581 on Jun 26, 2011 10:47 PMwith a as (
select ';1;10;2;3;4;5;7;8' str from dual union all
select ';10;2;3;4;5;8;9' from dual union all
select ';10;2;3;4;8;9' from dual
b as (
select '1' str from dual union all
select '2' from dual union all
select '6' from dual
-- end of on-the-fly data sample
select a.str,
b.str,
case
when a.str || ';' like '%;' || b.str || ';%' then a.str
else a.str || ';' || b.str
end combined_str
from a,
b
STR S COMBINED_STR
;1;10;2;3;4;5;7;8 1 ;1;10;2;3;4;5;7;8
;1;10;2;3;4;5;7;8 2 ;1;10;2;3;4;5;7;8
;1;10;2;3;4;5;7;8 6 ;1;10;2;3;4;5;7;8;6
;10;2;3;4;5;8;9 1 ;10;2;3;4;5;8;9;1
;10;2;3;4;5;8;9 2 ;10;2;3;4;5;8;9
;10;2;3;4;5;8;9 6 ;10;2;3;4;5;8;9;6
;10;2;3;4;8;9 1 ;10;2;3;4;8;9;1
;10;2;3;4;8;9 2 ;10;2;3;4;8;9
;10;2;3;4;8;9 6 ;10;2;3;4;8;9;6
9 rows selected.
SQL> SY.
Maybe you are looking for
-
CALL_FUNCTION_NOT_FOUND -- its Urgent
Hi, I am trying to print a document (Packing List). I have created OUTPUT Type "ZPAK" and assigned the Form and Program to this output type, When I try to Print the document through VL02N, I get this Message in my SAP INBOX: 00 671: ABAP/4 Processor:
-
Message Driven Bean - Configuration problem
Hi I have created the connection factory as jms/ConnectionFactory and physical destination as PhysicalQueue and queue as jms/Queue as per http://java.sun.com/j2ee/1.4/docs/tutorial/doc/MDB5.html#wp79772 http://java.sun.com/j2ee/1.4/docs/tutorial/doc/
-
When i try to open itunes its telling me to redownload it and the entry point can not be located
i try downloading the new softwear and once i did it told me ("the procedure entry point AVCPlayerItemDurationChangedNotification could not be located in the dynamic link libary AVFoundationCF.dl"l ()"ITunes was not installed correctlly. Please rein
-
WAAS 7341 uanble to optimize application runnnig with browser IE7
Hi, I'm having Cisco WAAS 7341 with version 4.1.5.F Aplication running on browser IE7 are unable to optimize the connection on WAAS where as the application running on browser IE6 are able to optimize the connection on WAAS.I do not find any bugs rel
-
Bigger cursors become pixelated in Mac OS X 10.5.8?
Hello. Is it me or does Mac OS X 10.5.8 makes cursors pixellated and ugly when making their cursors bigger than their defaults? Mac OS X 10.7.5 and 10.8.3 do not have this problems. Thank you in advance.