TWO_index on same column
Hi All,
In One of my table i saw two index on same column , NORMAL and BITMAP. is it necessary . how it will increase/Decrease the performance .
select index_name,index_type,owner,table_name from dba_indexes where table_name='DS_ATTRSTORE';
INDEX_NAME INDEX_TYPE OWNER TABLE_NAME
EI_ATTRSTORE BITMAP ODS DS_ATTRSTORE
EI_ATTRSTORE_ORG NORMAL ODS DS_ATTRSTORE
EI_ATTRSTORE_ATTRVAL BITMAP ODS DS_ATTRSTORE
select count(*) from ODS.DS_ATTRSTORE;
COUNT(*)
14892879
some times iam getting some deadlock error in this table . i doubted that because of useless Normal index already Bitmap is there in table ..guess so ..
please help me on this.
Thanks,
Edited by: 826854 on Nov 27, 2012 2:31 AM
Edited by: 826854 on Nov 27, 2012 2:31 AM
>
In One of my table i saw two index on same column , NORMAL and BITMAP. is it necessary . how it will increase/Decrease the performance .
select index_name,index_type,owner,table_name from dba_indexes where table_name='DS_ATTRSTORE';
INDEX_NAME INDEX_TYPE OWNER TABLE_NAME
EI_ATTRSTORE BITMAP ODS DS_ATTRSTORE
EI_ATTRSTORE_ORG NORMAL ODS DS_ATTRSTORE
EI_ATTRSTORE_ATTRVAL BITMAP ODS DS_ATTRSTORE
>
What you posted just shows the indexes; it doesn't show whether those are on the same column and what other columns might be included in each index.
Any DML on a BITMAP index will likely cause serialization and performance issues since at least two sets of rows need to be locked in order to do an insert or update.
Similar Messages
-
Multiple values from same column in diffetent columns in same row??
Hi all,
I am wondering how you can display different values from the same column into different columns on same row. For example using a CASE statement I can:
CASE WHEN CODE IN ('1', '3') THEN COUNT( ID) END as "Y"
CASE WHEN CODE NOT IN ('1', 'M') THEN COUNT( ID) END as "N"
Yes this will produce two columns needed but will also produce two separate records and null values for the empty's.
Any ideas?
ThanksIt's not clear what you want.
Can you post some examples as described in the FAQ: {message:id=9360002}
As my first guess, I would think you're looking for something like...
SQL> select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 00:00:00 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 00:00:00 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-1981 00:00:00 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 00:00:00 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-1981 00:00:00 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 00:00:00 2850 30
7782 CLARK MANAGER 7839 09-JUN-1981 00:00:00 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 00:00:00 3000 20
7839 KING PRESIDENT 17-NOV-1981 00:00:00 5000 10
7844 TURNER SALESMAN 7698 08-SEP-1981 00:00:00 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 00:00:00 1100 20
7900 JAMES CLERK 7698 03-DEC-1981 00:00:00 950 30
7902 FORD ANALYST 7566 03-DEC-1981 00:00:00 3000 20
7934 MILLER CLERK 7782 23-JAN-1982 00:00:00 1300 10
14 rows selected.
SQL> select count(case when deptno in (10,20) then deptno end) as deptno_10_20
2 ,count(case when deptno > 20 then deptno end) as deptno_30plus
3 from emp;
DEPTNO_10_20 DEPTNO_30PLUS
8 6 -
REPORT WITH CHANGING ITEM ON THE SAME COLUMN
Hi to all,
i'm trying to build a report with different item in the same column.
Is that possible in any way using other Oracle technique?
i'm not doing anything specific here, only i would like to know if the following possibility exist or not and how can i let apex render the htmldb_item fields 'dynamically'.
Using this CODE inside a PL/SQL function body returning sql query I obtain the following report content. Such the code of htmldb_item.fields is written, as a field value the HTML_ITEM is not rendered, so only the description of them appear in the report.
Does somebody know some tricks to make it work?
Thanx a lot
1 2 LAST_CALL htmldb_item.date_popup (4, ROWNUM, FLD_VALUE,'dd/mon/yyyy') VALUE
21 1 AGE htmldb_item.text(4,FLD_VALUE,10,10) VALUE
create or replace FUNCTION FNC_GEN_GUI_ITEM(ITEM_TYPE NUMBER) RETURN VARCHAR2 AS
STRHTMLDITEM VARCHAR2(4000);
BEGIN
CASE ITEM_TYPE
WHEN 1 THEN STRHTMLDITEM:=' htmldb_item.text(4,FLD_VALUE,10,10) VALUE ';
WHEN 2 THEN STRHTMLDITEM:=' htmldb_item.date_popup (4, ROWNUM, FLD_VALUE,''dd/mon/yyyy'') VALUE ';
END CASE;
RETURN STRHTMLDITEM;
END FNC_GEN_GUI_ITEM;
MY TABLE AS FOLLOWS:
CREATE TABLE "NEWPROJ"."DINFIELDGUI"
( "ID" NUMBER NOT NULL ENABLE,
"FLD_TYPE" NUMBER,
"FLD_NAME" VARCHAR2(4000 BYTE),
"FLD_VALUE" VARCHAR2(4000 BYTE),
CONSTRAINT "DINFIELDGUI_PK" PRIMARY KEY ("ID"));
Message was edited by:
Marcello NocitoHi to all,
i've solved, is very simple using decode inside the select:
SELECT
ID,
FK_HTMLDB_ITEM, DECODE(FK_HTMLDB_ITEM,1,HTMLDB_ITEM.DATE_POPUP(3,rownum,VAL,'dd-mon-yyyy'),2,HTMLDB_ITEM.TEXT(3,VAL)) VALORE
FROM TESTID
my table is:
CREATE TABLE "DEV"."TESTID"
( "ID" NUMBER NOT NULL ENABLE,
"FK_HTMLDB_ITEM" NUMBER,
"VAL" VARCHAR2(4000 BYTE))
Bye Bye -
F4 help based on the records in the same column
Dear All
its an fantastic blog....i have one different question for u....n u can check the below..
is it possible to get F4 functionality for a record in column in ALV based on the first 3 records of the same column....
material vendor shipping contract
2 4 6 -
> 5(f4 help)
3 2 4 6(f4 help)
the contract value should only come based on the first 3 records of the coulumn and it shouldnt show any other value...other than combination values of first 3 records.....
hope u got me know.....
please let me know if you need further clarification....thanks in advance....
Regards,
Kartheek.....Hi Kartheek,
do a where-used-list on function F4_INT_HELP_VALUE_REQUEST, start with B* programs.
Or do a search on SCN and find [ABAP Code Sample to Attach F1 and F4 Help Fields in ALV Grid|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d] and [view the code sample|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d?quicklink=index&overridelayout=true].
I hope your approved programming skills allow you to copy&paste.
Regards.
Clemens -
How to set different renderers to different cells in same column of JTable?
Hello Friends,
I need your help again...
Does any body knows, how to set different renderer's for different cells of same column in JTable..??
For ex.
Col1 Col2 Col3 Col4
A A A A
A A A B
A A A C
A A A D
Where A B C D would be different Renderers. I want set exactly same ,,, ie. one column with different renderer at different cell positions..
Right now i m setting renderer using statement bellow :
table.getColumnModel().getColumn(int).setCellRenderer(rederer_Instance);But with this, effect in the last renderer is applicable whole column....
Can any body help me out ?????????
please refer this thread for similar kind of discussion...
http://forums.sun.com/thread.jspa?forumID=57&threadID=571445Thanks
SuyogPlease refer to the first reply of [this thread|http://forums.sun.com/thread.jspa?forumID=57&threadID=571445] for the answer. If you have a specific problem implementing it, post you code with a specific question.
-
Passing Parameters For Same Columns In 2 Different Tables
OBIEE 11g
I have 2 different dimension tables in my Subject Area.
Dim1 has following columns: Promotion Code, Promotion Description, Promotion Date
Fact1 has following columns: a_count, b_count, c_count
Dim2 has following columns: Promotion Code, Promotion Description, Promotion Date
Fact2 has following columns: a_count, b_count, c_count, d_count
Report 1 has following columns: Promotion Code, Promotion Description, Promotion Date, a_count, b_count, c_count (From Dim1 & Fact1)
Report 2 has following columns: Promotion Code, Promotion Description, Promotion Date, a_count, b_count, c_count, d_count (From Dim2 & Fact2)
I have tried to pass the parameters Promotion Code, Promotion Description, Promotion Date from Report 1 to Report 2 but this has not worked for me as Report 2 is not receiving the parameters. Is there a way I can do this. Thanks in advance.Thanks for your response Jay,
In Report 1 I have added prompts (Prompts tab) for Promotion Code, Promotion Description and Promotion Date. I have also set the following presentation variables in the prompts:
PromotionCode,
PromotionDescription
PromotionDate
In Report 2 I then add a filter for each of the same columns and match them to the presentation variables created in Report 1 as follows:
Promotion Code is equal to / is in @{PromotionCode}
Promotion Description is equal to / is in @{PromotionDescription}
Promotion Date is equal to / is in @{PromotionDate}
My expectation is that the values in the presentation variables will be passed from the Prompts in Report 1 to the filters in Report 2. This is not what is happening. Im not sure what I am doing wrong. -
Constructing Calculated Measures in MDX for different measures using same columns in a fact table
Hello,
i have a fact table with 2 columns corresponding to dimensions Dim1, Dim2. In the same table i have 4 other columns Value_Type(int), INT_VALUE(int), FLOAT_VALUE(float), TEXT_VALUE(string). There are a number of measures which are identified by Value_Type and
depending on their nature could be written in one of the 3 columns (INT_VALUE(int), FLOAT_VALUE(float), TEXT_VALUE(string)) Let's say Measure1 with Measure_Type=1 is age, 2 is account balance and 3 is Name for clarity. There could be other measure types that
use these 3 same columns for data. So the sample fact table looks like this
Dim1 Dim2 Measure_Type INT_VALUE FLOAT_VALUE TEXT_VALUE
10 10 1 25
10 10 2 2000,34
10 10 3 John
10 20 1 28
10 20 2 3490,23
10 20 3 Frank
My task is to write an MDX query for each Dim1, Dim2 combination which returns all 3 measures in the same row. The idea is to construct a calculated member for each Measure that returns value from the right field. For example for Measure1 we take INT_VALUE
with measure_type=1. The problem is i don't know how to construct MDX query for these calculated members. Can you please help me?
So my final goal is to write an MDX query that returns all measures in one row for each set of Dim1, Dim2
SELECT [Measure1], [Measure2], [Measure3] ON COLUMNS,
NON EMPTY [Dim1].[Dim1].[Dim1].Members*[Dim2].[Dim2].[Dim2].Members ON ROWS
FROM [Cube]
Dim1 Dim2 Measure1 Measure2 Measure3
10 10 25 2000,34 John
10 20 28 3490,23 FrankHi Kosmipt,
I would combine the "INT_VALUE", "FLOAT_VALUE" and "TEXT_VALUE" columns into one with STRING data type for the fact table. And there should be one dimension to store the Measure_Type informations. Then in cube, you can write MDX scope for every one of
"Measure_Type" dimension members. For example,
scope(
[Measures].[M]
[DimMType].[MType].&[1]= CINT([Measures].[M]);
end scope;
Once the cube is built by the above way, you can write MDX like something like the following to achieve your purpose.
WITH member [Measures].[Measure1] AS ([DimMType].[MType].&[1],[Measures].[M])
member [Measures].[Measure2] AS ([DimMType].[MType].&[2],[Measures].[M])
member [Measures].[Measure3] AS ([DimMType].[MType].&[3],[Measures].[M])
thanks,
Jerry -
Same column name from different table
i have a sql query as like this : "SELECT * FROM TABLE1,TABLE2". i use oracle. both TABLE1 and TABLE2 have the same column named 'COLUMN1'. while i get rows how i know the value of COLUMN1 from which table (TABLE1 or TABLE2).
sample code snippet is above. do u help me!
while (rs.next())
value1 = rs.getString("COLUMN1");
// is value1's value from table1 or table2. how do i know this?
// i try value1 = rs.getString("TABLE1.COLUMN1"); but it doesn't work :(
....I case you don't know what an alias is, it would look something like this:
SELECT a.COLUMN1 as FirstColumn1, b.COLUMN1 as SecondColumn1 FROM FirstTable a, SecondTable b
Notice that in the FROM clause we've appended a short name for each table. You're not limited to one character, but I try to keep it simple. Now we can refer to the tables as a and b.
Because I did that I have to refer to any ambiguous columns (although it's good practice to refer to ALL columns) using the table name prefix and a period. This tells the driver which "COLUMN1" I want. Then we include as AS clause which allows us to tell the driver what we want that column name to be when it's returned to us. This is specially usefule when I have two columns in two separate tables with the same name (as you have here) or if I'm calculating data (i.e. (a.QTY * b.PRICE) as UnitPrice) that doesn't have a column name, so here I can give it one.
It's a little weird at first since you use the alias names in the select before you actually define them in the FROM clause, but you'll get use to it.
Now you retrieve FirstColumn1 and SecondColumn1 from your ResultSet, not Column1.
HTH. -
Formula to Calculate Cell Above in the Same Column?
How do you write a formula that looks if two cells (with dates) are identical in the same column; and if they are not identical, subtract 1 day from the date in the above cell to determine the date for the cell below it.
=IF($A1=$A2,B1-1,B2+28)How do you write a formula that looks if two cells (with dates) are identical in the same column; and if they are not identical, subtract 1 day from the date in the above cell to determine the date for the cell below it.
=IF($A1=$A2,B1-1,B2+28) -
I am having trouble getting a numbers spreadsheet to hold different formats in the same column. A column with a date formatted heading will not convert to $ for the cells below. Any suggestions would help.
Hi Wayne,
Thank you for this response. I have tried this but when I start enterring $ amounts some, such as $6.00, go in OK others such as $4.00 appear as a date ie 4 Oct 12.
Kind regards
Paul -
Different ItemRenderer's in the same column of a datagrid
I am using actionscript to read some XML input and dynamically add data into the datagrid.
Currently I am reading the first row and depending on the data type of the coulmn i am creating the column to be a IntemRenderer of Image, or Link button.
Now is there anyway of adding some rows to be LinkButton ItemRenderes and some to be Image ItemRenderers, in the same column?
Any examples are also appreciatedYou can try overriding createColumnItemRenderer
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui -
Deleting from multiple tables where few tables have same column name
Hi,
I am new to PL/SQL and need some help. I need to delete data older then X years from some 35 odd tables in my schema and out of those tables 25 tables have same column name on which i can have my "where" clause and rest 10 table have different table names. I am doing something like this :
declare
table_list UTL_FILE.FILE_TYPE;
string_line VARCHAR2(1000);
tables_count number:=0;
table_name VARCHAR2(400);
column_name VARCHAR2(400);
BEGIN
table_list := UTL_FILE.FOPEN('ORALOAD','test7.txt','R');
DBMS_OUTPUT.PUT_LINE(table_list);
LOOP
UTL_FILE.GET_LINE(table_list,string_line);
table_name := substr(string_line,1, instr(string_line,'|')-1);
column_name := substr(string_line, instr(string_line,'|')+1);
DBMS_OUTPUT.PUT_LINE(table_name);
DBMS_OUTPUT.PUT_LINE(column_name);
IF column_name = 'SUBMISSION_TIME' THEN
delete from :table_name where to_date(:column_name)<(sysdate-(365*7));
ELSE
delete from || table_name || where ( || to_date(column_name) || ) <(sysdate-(365*7));
END IF;
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND THEN
UTL_FILE.FCLOSE(table_list);
DBMS_OUTPUT.PUT_LINE('Number of Tables processed is : ' || tables_count);
UTL_FILE.FCLOSE(table_list);
END;
WHERE the text file "text7.txt" contains list of table name and column names separated by a pipe line. But when I execute the above proc it gives error "invalid table name".
Can something like this be done or is there any other way to execute this task of deletion from 35 tables.
Thanks.Thanks for replies. I don't know what I am doing wrong but still not getting this damn thing work...This is the proc i am running now :
declare
table_list UTL_FILE.FILE_TYPE;
string_line VARCHAR2(1000);
tables_count number:=0;
table_name VARCHAR2(4000);
column_name VARCHAR2(4000);
code_text VARCHAR2(2000);
BEGIN
table_list := UTL_FILE.FOPEN('ORALOAD','test7.txt','R');
LOOP
UTL_FILE.GET_LINE(table_list,string_line);
table_name := substr(string_line,1, instr(string_line,'|')-1);
column_name := substr(string_line, instr(string_line,'|')+1);
IF column_name = 'SUBMISSION_TIME' THEN
DBMS_OUTPUT.PUT_LINE('do nothing');
ELSE
code_text:= 'begin delete from'|| (table_name) ||'where to_date' || (column_name) || '<(sysdate-(365*7))';
Execute Immediate code_text;
END IF;
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND THEN
UTL_FILE.FCLOSE(table_list);
DBMS_OUTPUT.PUT_LINE('Number of Tables processed is : ' || tables_count);
UTL_FILE.FCLOSE(table_list);
END;
But it gives following error :
" ORA-06550: line 1, column 51:
PL/SQL: ORA-00933: SQL command not properly ended
ORA-06550: line 1, column 7:
PL/SQL: SQL Statement ignored
ORA-06550: line 1, column 68:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
ORA-06512: at line 22 " -
Does not do the sorting if I click twice to the same column.
Hello
I am new to winforms.
I have a listview. I want it to toggle the sorting of the records of the listview when the columns are clicked
Please guide me as to how to do the same.
The code that I have attached does not do the sorting if I click twice to the same column. I have to click a different column ten the previous column
The code is attached below
regards
Manoj Gokhale
private void SiteInChargeorSupervisor_Load(object sender, EventArgs e)
this.listView1.ColumnClick += new ColumnClickEventHandler(listView1_ColumnClick);
private void listView1_ColumnClick(object sender, ColumnClickEventArgs e)
ListViewSorter Sorter = new ListViewSorter();
listView1.ListViewItemSorter = Sorter;
if (!(listView1.ListViewItemSorter is ListViewSorter))
return;
Sorter = (ListViewSorter)listView1.ListViewItemSorter;
if (Sorter.LastSort == e.Column)
if (listView1.Sorting == System.Windows.Forms.SortOrder.Ascending)
listView1.Sorting = System.Windows.Forms.SortOrder.Descending;
else
listView1.Sorting = System.Windows.Forms.SortOrder.Ascending;
else
listView1.Sorting = System.Windows.Forms.SortOrder.Descending;
Sorter.ByColumn = e.Column;
listView1.Sort();
public class ListViewSorter : System.Collections.IComparer
public int Compare(object o1, object o2)
if (!(o1 is ListViewItem))
return (0);
if (!(o2 is ListViewItem))
return (0);
ListViewItem lvi1 = (ListViewItem)o2;
string str1 = lvi1.SubItems[ByColumn].Text;
ListViewItem lvi2 = (ListViewItem)o1;
string str2 = lvi2.SubItems[ByColumn].Text;
int result;
if (lvi1.ListView.Sorting == System.Windows.Forms.SortOrder.Ascending)
result = String.Compare(str1, str2);
else
result = String.Compare(str2, str1);
LastSort = ByColumn;
return (result);
public int ByColumn
get { return Column; }
set { Column = value; }
int Column = 0;
public int LastSort
get { return LastColumn; }
set { LastColumn = value; }
int LastColumn = 0;Every time through the ColumnClick event handler, you are creating a new sorter. This means that any values set in the sorter from the previous click are not saved.
Try this.
private void listView1_ColumnClick(object sender, ColumnClickEventArgs e)
// Only create a new sorter if we don't have one already.
if(listView1.ListViewItemSorter == null)
ListViewSorter Sorter = new ListViewSorter();
listView1.ListViewItemSorter = Sorter;
// And so on with the rest of your code. -
How To Create Table View With Same Column name But Different Table?
Hi All,
I have the problem to create a tableview with same column name but in different table.
The Table that i have:-
Table - PAC051MPROFORMA
Column - mrn,visitid
Table - PAC051TPROFORMA
Column - mrn,visitid
Table - PAC052MTRANSBILL
Column - mrn,visitid
Then i want to create a table view to view that table. This is my SQL
CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
where
*(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
and
*(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
That SQL Return this error = ORA-00957: duplicate column name
Then I modify that SQL to
CREATE VIEW pacviewproforma (mrn,visitid)
As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
where
*(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
and
*(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
This time this error return = ORA-01730: invalid number of column names specified
What should i do?
Thanks...Hi,
SQL> CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
2 As Select
3 PAC051MPROFORMA.mrn,
4 PAC051MPROFORMA.visitid,
5 PAC051TPROFORMA.mrn,
6 PAC051TPROFORMA.visitid,
7 PAC052MTRANSBILL.mrn,
8 PAC052MTRANSBILL.visitid
9 from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
10 where
11 (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
12 and
13 (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
ERROR at line 1:
ORA-00957: duplicate column namePlease give different names to each column.
Something like this..
SQL> CREATE OR REPLACE VIEW pacviewproforma (MPROFORMA_mrn,MPROFORMA_visitid,TPROFORMA_mrn,TPROFORMA
_visitid,MTRANSBILL_mrn,MTRANSBILL_visitid)
2 As Select
3 PAC051MPROFORMA.mrn,
4 PAC051MPROFORMA.visitid,
5 PAC051TPROFORMA.mrn,
6 PAC051TPROFORMA.visitid,
7 PAC052MTRANSBILL.mrn,
8 PAC052MTRANSBILL.visitid
9 from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
10 where
11 (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
12 and
13 (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
View created.
SQL> DESC pacviewproforma;
Name Null? Type
MPROFORMA_MRN NUMBER
MPROFORMA_VISITID NUMBER
TPROFORMA_MRN NUMBER
TPROFORMA_VISITID NUMBER
MTRANSBILL_MRN NUMBER
MTRANSBILL_VISITID NUMBER
ORA-01730: invalid number of column names specifiedThe list of column nmae you specified during the CREATE VIEW should match with the SELECT list of the view.
Twinkle -
JOIN 2 tables that have same column ?
I need to learn how to join two tables that both have the same column name:
tbl1 - idskey
tbl2 - idskey
the idskey column holds a id_number
When I do the JOIN I would like to make sure that only Distinct records are joined from both tables and that any duplicates are removed in the final join. So if:
Tbl1 has a idskey of: 12345
and
Tbl2 has a idskey of: 12345
In the final JOIN I want to remove one of those duplicates.
I actually need to join 3 tables that have the same linking column names for the join, but if I learn how to do this correctly on 2, that will be a start.
10g for db, thanks!Hi,
SELECT DISTINCT and GROUP BY are the most common ways to get unique results from non-unique keys. Exactly how you use them depends on exactly what you want to do.
SELECT DISTINCT guarantees that no two rows in the result set, conisdering all columns, will be identical.
GROUP BY produces one row from a set of rows that have a common feature. The values on that row may be a composite of values from various rows in that set (e.g., an average).
Please post a small, specific example. For instance:
"I have two rows in tbl1 ...
and these fhtee rows in tbl2 ...
Notice how there is one row with idskey=12345 in tbl1 but two such rows in tbl2.
How can I get theses results ...
where only one row has idskey=12345?"
Maybe you are looking for
-
Why we have to go for OO compare to ABAP
Hi Everyone, I am just starting to learn ABAP OO ..can any one please gimme some simlpe examples to understnd y we have to go for OO where we have already have ABAP and whats going to be the advantage of OO.. Thanks in advance.. Joe.
-
Trying to make a book - iPhoto changing the order of my manually sorted album. Help?
I'm trying to make a book from an album. I have manually sorted the photos in the album and wanted autoflow to fill the book in. However, when I create a new book from the album, iPhoto seems to re-order the photos by one of the other options (eg: b
-
844,845 & 849 seeburger meta data &maps
Hi, we have Seeburger EDI adapter ,but we need to implement interfaces using transaction sets 844,845,849.but we don't see any meta data info and Maps for those in the software we have downloaded. so how can we get them?do we need to request from See
-
Post Author: niketya CA Forum: Older Products I have never used Crystal Report so my knowledge about this product is rather poor. We are using crystal viewer in a custom made application which generates crystal reports and saves them in 1rd format.
-
Hi, I'm looking for collective information for all hotfixes released by Microsoft with information such as patch and product code for msiinstall, patch and product name, e.g.:Patch Code : {97EBAE10-0D01-458E-BBD7-74ADBE8A51C9} Product Code : {9014000