compare two table with cluster inside
Hello
I want to compare two tables containing a cluster with several groups in it. When you use the equal the result is the same pattern as the cluster of entry. But I just need a true or false. It doesn't bother me that it changed on position 1 or any other position.
Is there an elegant way to do it?
Thanks for any help.
Yves
Right-click equality and change to compare aggregations. That, or add a table and later.
/Y
Tags: NI Software
Similar Questions
-
Compare two tables with Look up table
Hi all
I basically, I have 3 tables T1, T2 and T3 (Look up table)
T1
Col11 Col12
AA 888
AA 444
BB 666
BB 447
BB 478
BB 999
T2
Col21 Col22 Col23
HHH 123 lll
HHH 123 ppp
HHH 123 uuu
GHG 345 kkj
GHG 345 rer
uyy 475 hhh
T3
Col31 Col32
AA 123
AA 345
AA 564
BB 564
BB 475
I need to know if all the correspondence of values (T3. Col31) Q1. Col11 are in T2. If not what are the missing persons
I have this table of correspondence T3 to match between T1 T3
As a data above, I need to get the following out put
T1. Col11 T3. Col32 T2. Col22 T2. Col23
AA 123 hhh lll
AA 123 hhh ppp
AA 123 hhh uuu
AA 345 GHG kkj
AA 345 GHG rer
AA 564 NULL NULL
What type of query, I can use to get the result
See you soon
SexyHello
You just need to use an outer join :)SELECT t1.col11, t3.col32, t2.col22, t2.col23 FROM t1, t2, t3 WHERE t1.col11 = t3.col31 AND t3.col32 = t2.col21 (+)
-
by comparing the two tables with
With the help of 10 gr 2
Assuming that we have two tables with the following structure:
create table1 (integer id, amount1 number, status varchar2 (200));
create table2 (integer id, number, status varchar2 amount2 (200));
Table1 contains a single line:
ID = 4711, amount1 = 3, status = "not ok".
Table2 contains one or more lines with table2.id = table1.my_field referenced:
ID = 4711, amount2 = 2, status = "not ok".
ID = 4711, amount2 = 2, status = "not ok".
ID = 4711, amount2 = 1, status = "not ok".
ID = 4711, amount2 = 4, status = "not ok".
The amount1 in Table1 is a cumulative sum of Table2 lines what status should be set to "ok". Table1.my_field is particularly well indexed.
How to make all the lines (for example via the rowid) from Table2 that sum on amount2 is the amount1 in the line after line in Table1 (for switching their table2.status to 'ok')?
I hope my question is clear enough...Try this
SQL> select * from table2; ID AMOUNT2 STATUS ---------- ---------- ------ 4711 2 Ok 4711 2 not ok 4711 1 Ok 4711 4 not ok SQL> roll Rollback complete. SQL> select * from table1; ID AMOUNT1 STATUS ---------- ---------- ------ 4711 3 not ok SQL> select * from table2; ID AMOUNT2 STATUS ---------- ---------- ------ 4711 2 not ok 4711 2 not ok 4711 1 not ok 4711 4 not ok SQL> SQL> SQL> update 2 table2 a 3 set 4 a.status = 'Ok' 5 where 6 rowid in 7 (select t2.rowid 8 from 9 (select 10 table2.*, 11 sum(amount2) over (partition by id order by rn) rn_total 12 from 13 (select table2.*, row_number() over (partition by id order by amount2) rn from table2 ) table2) t2, 14 table1 15 where 16 table1.id = t2.id and 17 t2.rn_total <= table1.amount1) 18 / 2 rows updated. SQL> select * from table2; ID AMOUNT2 STATUS ---------- ---------- ------ 4711 2 Ok 4711 2 not ok 4711 1 Ok 4711 4 not ok SQL>
-
BUG? Statement of BRIDGE to compare two tables
Hello
I tried to compare two tables different dbs and remembered a post on applications to Connectin Cross
http://barrymcgillin.blogspot.com/2010/11/cross-connection-queries.html
I expect to get the differences between the ARB table in my current schema and the table alias temparb arb in the other db. Yet it seems that in this case only the table in my current schema is read.BRIDGE temparb AS "EB05 01" (SELECT * FROM arb) (SELECT * FROM temparb MINUS SELECT * FROM arb ) UNION ALL (SELECT * FROM arb MINUS SELECT * FROM temparb );
I materialize at the table BRIDGE with
and select the value that I know to be only in the remote schemaBRIDGE temparb AS "EB05 01" (SELECT * FROM arb)
Both times I get no results. I even tried to use aliases on the table, same result. Tested in EA3 3.0 and 3.1.SELECT id FROM temparb WHERE id = 2562; SELECT id FROM arb WHERE id = 2562;
Has anyone tried this before?
Concerning
MarcusHi Marcus,
Have you tried without the quotes around the name of connection?
I have a named connection
system_local
which I run the following commanddrop table testbridge_remote;
drop table testdbrige;
create table testbridge (col1 int);
insert into testbridge values (1);
insert into testbridge values (2);
insert into testbridge values (3);
commit;I have a named connection
Name of the connection with space
I performed the following in thedrop table testdbrige;
create table testbridge (col1 int);
insert into testbridge values (4);
insert into testbridge values (5);
insert into testbridge values (3);
commit;Then I can execute the following statement in the connection of system_local/worksheet
BRIDGE testbridge_remote as the name of connection with Space(select * from testbridge)
+ (SELECT * FROM testbridge_remote +)
LESS
SELECT * from testbridge
+)+
UNION ALL
+ (SELECT * FROM testbridge +)
LESS
SELECT * from testbridge_remote
+);+It works well.
Returns the rows in the remote table not in the local table and lines in the local table, not the remote table.Kind regards
Dermot
SQL development team. -
Hello
I need to compare two tables (T1, T2) and update existing records only in T2, but not in T1. So basically, the lines updated in T2:
Select * from T2 where T2.id not in (select id from T1).
What would be a good way to achieve this in ODI?
I created an ODI interface with a join T2.id not in T1.ID, but it did not work "coz:" ORA-01427: einreihig subquery returns several lines "."
Appreciate any input/access map.
Thank you.Hi Michele...
At first glance, there are at least 2 ways to do it:
(1) put the steps in "(select id from T1)" (you can use an ODI API to get the schema dynamically) as an object filter to T2 (interface), use the incremental update IKM SQL and put "Insert" option on 'No'. " This will do a few updates.
OR
(2) in an interface set the T1 and T2 and left join (based on T2) load a temp table where all fields accept the value zero. Next to the columns to update (of course the T2), create an ID column (I named him as T1_Temp_ID) and map the Id of the T1 to it.
Now just create new interface where the temperature is source and put a filter like "T1_Temp_ID is not null.The first option is less complex and can bring better performance.
The second option gives a better follow-up of the use of the table and the columns, but can be less performatique.This help you?
-
I want to compare two tables and out a boolean
This should be simple. I want to compare two tables (5 items) and return a single Boolean value (T/F), not an array of Boolean.
Thank you
Kevin
Right click on the comparison, the comparison mode, select compare the aggregates.
-
Compare two tables, APEX
Hello
I am trying to compare two tables, but I want to display values that are the differnet from one to the other,
both tables have the same columns and have the same PK.
Thank you.Hello
You probably need a report based on a query like this:
SELECT d1.deptno, d1.dname, d2.dname, d1.loc, d2.loc FROM dept1 d1 INNER JOIN dept2 d2 ON d1.deptno = d2.deptno AND ( d1.dname <> d2.dname OR d1.loc <> d2.loc )
You can also consider using FULL JOIN where you have different values of primary key in both tables and you want to include in the report.
-
How to match columns from two tables with
Hello:
I have two tables as below:
Table1::(Base Table)
Country | Prefix | Prefix_Length
Travel | 001 | 3
CountryB. 0012 | 4
PaysC | 00443 | 5
CountryD | 0091 | 4
:(Detail Table) table2
The population | Area | Prefix
500 | AreaA | 0015921
1000 | AreaB | 00122
400. AreaC. 00443743
300. ALIS | 0091333
100. AreaA | 001
I need to match these two tables with prefix columns (whose length is not fixed in the two tables: but it starts with 00 in the two tables). Two different countries the prefix may be similar up to a certain length. Thus, Prefix_Length can be used to determine (exactly) how much time should be taken in the search of Table2.
Output:
Country | Prefix | Area | Population
Travel | 001 | AreaA | 600
CountryB. 0012 | AreaB | 1000
PaysC | 00443 | AreaC. 400
CountryD | 0091 | ALIS | 300
Please help me with your valuable comments.
-TenderTry this
with base_table as ( select 'CountryA' country,'001' prefix,3 prefix_length from dual union all select 'CountryB','0012',4 from dual union all select 'CountryC','00443',5 from dual union all select 'CountryD','0091',4 from dual ), detail_table as ( select 10 no_of_call,'0015921' prefix from dual union all select 3,'00122' from dual union all select 50,'00443743' from dual union all select 50,'00443643' from dual union all select 300,'0091333' from dual union all select 60,'001' from dual ) SELECT country, prefix,sum(no_of_call) FROM ( select country, b.prefix,no_of_call, decode(no_of_call,lead(no_of_call,1,0) over(partition by no_of_call order by b.prefix,no_of_call),'y','n') y_or_no from base_table b, detail_table d where b.prefix = substr(d.prefix,1,prefix_length)) where y_or_no !='y' group by country, prefix order by country, prefix;
Published by: Vi on 20 February 2012 01:07
-
can anyone tell how to compare two documents with two controlled with the same mouse pointers
can anyone tell how to compare two documents with two controlled with the same mouse pointers?
Windows and OS X can only display a mouse pointer - it is created by the operating system, not the application.
-
Hello
can you please help me.
How can I compare two table. following my code...
var my_array:Array = Array (5,10,15,20,25,30)
var new_array:Array = Array (7,8,9,10,11,12,13)
for (var i: Number = 0; i < my_array.length; i ++) {}
{if(my_array[i]==new_array[i])}
trace (my_array [i])
}
}Thanks in advance,
JaxNa
Then, you're almost on correct... See the same code that I modified a little,
var my_array:Array = Array (5, 10, 15, 20, 25, 30);
var new_array:Array = Array (7, 10, 9, 10, 10, 30, 13);for (var i: Number = 0; i
If (my_array [i] is {new_array [i]})
trace ("' my Array'" + i + "("+my_array[i]+")"new_array' "+ i +"("+new_array[i]+") = Matching");
} else {}
trace ("' my Array'" + i + "("+my_array[i]+") 'new_array'" + i + "("+new_array[i]+") = is only not to");
}
}If this is not so, explain exactly what you want
-
compare two tables and update the differences
Hi all
Sorry for the newbie question, but I am a beginner in the present.
I have two tables, both have same structure-
CODE - code NUMBER (6,0) store is the primary key does not change and is unique
ADDRESS1
ADDRESS2
ADDRESS3 - all VARCHAR2 (100)
One of the tables is named MASTER, the other being updated. MASTER contains hundreds of lines, while the table of UPDATES may have anywhere from zero to 10 or more.
I want to compare the table of UPDATES against the MASTER of the table and if there is a difference, ask the differences in the table in UPDATES to the MASTER of table - so if the address of an Exchange store, then the change is reflected in the MASTER table by crushing with the data contained in the UPDATES table.
I thought that maybe using sliders and compare each field but there must be a more efficient way.
I hope that I have explained quite clearly... any help would be greatly appreciated.
Thank you
BillEducation MERGE, assuming that your version supports supported the MERGER.
SY.
-
How to link two tables with form
Hello
Here's what I want to do
I have a table-> Student (rollno, name)
I also have these two tables (rollno, marks) Math Physics (rollno, marks)
now, I want to have a form in my page (in which I can navigate school records) and two tables in the adf (Math, physical). When selecting a certain record of the form, I want to see data associated with these two tables.
I try to make the link display but works for me...
Please help me on this.
-Usman
-Open the module of the application
-Go to the model data tab
-You will see all the your available on the left and your already added to the AM to the right
-For the your who are 'master' for others your (in your case, student VO's master VO of Math and physics VO), you will see a (+) monkey behind it
-Expand this node and you will see the math and physics your.
-Math VO on the left and the VO student on the right then click on the button (>) to shuttle Math VO VO of the student child and give it a name
-Repeat step for physics VO
After completing the above steps and save, go back to your jsf (or jspx or...) and in the data tab control you will see this student VO is now two children, Math and physics. Use WHAT YOUR theses to create your tables for details.
Kind regards.
-
Two tables with different values of basic on an analysis filter
Hi guys,.
Let assume that I have an analysis with columns: group_id and sales.
On this basis I would like to create two tables: table1 where group_id = 1 and table2 where group_id = 2.
OBIEE is able to do?
Kind regards
SlaviHi Slavi,
You can do it in a single analysis, but you have to have the column with group_id twice.
Bring, group_id_1, group_id_2 (same column), sale
Now in table 1.
bring group_id_1, sales
Then in the selection steps for group_id_1-> select members-> Action choose keep only-> choose the value of the filter 1
This will filter the table 1 with group_id 1
In table2 group_id_2 porter, sales
Then do the same step for group_id_2 with the value 2.
You now have two reports with different filter in the same report.
If you want you can keep the same name column for the two columns group_id, I just kept group_id_1, group_id_2 for easy reference.
-
Insert two tables with a single query (same ID)
Hello
I want to insert two tables at the same time (with a single request) provided that both records get inserted with the same identifier. How can I do this?
(a) insert in the first table, retrieve the id (can be usingTable Movies id name Table Category movie_id cat_type
and then insert into another table.my_sequence.currval
question: He brings three queries to the Database, I also suspect that when several people trying to insert there is a problem, I could be wrong.
I have no other idea.
Greatly appreciated!think you need to do as an anonymous pl/sql block.
Dim cn As New OracleConnection("DataSource = xx'; user id = xx; password = xx;") Try 'build the anonymous pl/sql Dim sb as New System.Text.StringBuilder sb.Append("declare") sb.Append(" l_N number;") sb.Append("begin") sb.Append("insert into movies (id,name) values (my_sequence.nextval, 'film1') returning id into l_N;") sb.Append( "insert into category values (l_N, 'Category type');") sb.Append(" END;") 'create commd object Dim cmd as New OracleCommand(sb.ToString,cn) cmd.Connection.Open() cmd.ExecuteNonQuerry() cmd.Connection.Close() cmd.dispose() Catch ex as Exception blah blah blah End try
Published by: pollywog on May 28, 2010 10:48
Published by: pollywog on May 28, 2010 10:49
-
How to compare two TABLES and different lines of list?
I have two structural equal paintings aaa and bbb
that (could) have different lines.
How can I compare the tables and display different lines?
PeterSomething like this->
SELECT aaa.*,'bbb' "Not present in" FROM aaa MINUS SELECT bbb.*,'bbb' "Not present in" FROM bbb UNION ALL ( SELECT bbb.*,'aaa' "Not present in" FROM bbb MINUS SELECT aaa.*,'aaa' "Not present in" FROM aaa )
Kind regards.
LOULOU.
Maybe you are looking for
-
Satellite U305-S5127 - where can I activate the HDMI?
I have Satellite U305-S5127 and I am trying to connect my laptop to the TV via d - sub to I just bought a hdmi cable. I can't get the image on the TV. I installed the HDMI Control Manager, but he always asks me to allow HDMI. Where do I active HDMI?
-
OfficeJet 6210: Officejet 6210 do print after upgrade to 8.1 Windows
I've reluctantly Windows 8 upgraded to 8.1. And now, my Officejet 6210 not print. When you are prompted to print, the printer icon appears in the toolbar showing employment is printing, or, a message appears indicating printing, but nothing print
-
Is there a simple list with what can do the 8600 printer?
Is there a list somewhere with all the features of HP Officejet Pro 8600 explained or mentioned briefly? Stuff like 'you can automatically scan several pages and send it to an e-mail address' and 'you can print with your smartphone with the help of a
-
Toggle keys does not make a tone
ToggleKeys is enabled (a check mark in "Turn on toggle keys"), but there is no dial tone when you press SHIFT caps lock, NumLock or scroll stop. I pressed 'Apply' then 'OK '. My computer does have an internal speaker. How to hear a dial tone?
-
How to check if device supports for wifi or not?
Hello I want the code for the wifi and mobile network... If wifi is available then want to go throgh wifi (= wifi interface). How do I know peripheral support for wifi?