Hi,
How can I get the definition for all indexes in a particular schema.
with regards
Jagdish S. Rawat
IBM Certified DB2 DBA
IGSI, DLF Silokhera, Sector 30,
NH-8, Sector 30, Opp. 32nd Milestone,
Gurgoan -122001
Ph.# +91-124-4136722(Direct) +91-124-2832424 Ext. # 6722
Fax# +91-124-2836995
Mob# +919818433596
"Aniruddha" <db2udbdba-ezmlmshield-x62502290.[Email address protected]
06/28/2006 05:26 PM
To
"LazyDBA Discussion" <[Email address protected]
cc
Subject
RE: 2 Million Records, Duplicate and SubString Removal
You can use the following SQL in ORACLE to remove the duplicate rows
delete from t1 a
where rowid > (select min(rowid) from t1 b where a.col1 = b.col1)
Thanks & Regards,
Aniruddha Gupta
-----Original Message-----
From: senthil1
[mailto:db2udbdba-ezmlmshield-x56664171.[Email address protected]
Sent: Wednesday, June 28, 2006 4:57 PM
To: LazyDBA Discussion
Subject: Re: 2 Million Records, Duplicate and SubString Removal
In db2 we can remove the duplicates based on grouping , Please check
the
function for oracle or in sql server
select the distinct value and insert them in to your table
Example
select NameId
,NameString
,length
from
(
select
NameId
,NameString
,length
,ROW_NUMBER() OVER(PARTITION BY NameString) AS ROW_ID
from
NamesTable
)
where
ROW_ID=1
;
Regards
Senthil S.
"Ranjit Singh Sandhu "
<db2udbdba-ezmlmshield-x92459081.[Email address protected]
06/28/2006 04:50 PM
To
"LazyDBA Discussion" <[Email address protected]
cc
Subject
Re: 2 Million Records, Duplicate and SubString Removal
Sorry, the formatting got removed. So resending the question.
Hello,
I have 2,000,000 records in an RDBMS (Oracle 9i/10g or SQL Server 2000)
Let me define the question in the following points:
1. I have 2 Million records like the following
TABLE NAME: NamesTable
Columns: NameId, NameString, length,
Example Data:
Row1: "R2ZRWRTY",
"RRRARAZZZRAAZRZARWZWZRWRZWZAZRRRZWRZRRRRZRWRRRZAARAZZRWRZWZZWZRRRRARZWR
ZRRR
ZAWRRZZRWRZRRZAZAARWRRRRANZRRRA", 106
Now in the above structure of table assume you have 2 million records.
NameString length is never more than 200.
2. In the "NamesTable" Table Remove all the DUPLICATE "NameString".
3. In the table left after removing duplicates, REMOVE ALL THE SUB -
NameString.
For Example, If NameString1="WORLDISGREAT" and NameString2 =
"GREAT",
then you can clearly see that NameString2 exists in NameString1. So
REMOVE
NameString2 because it is contained in NameString1.
So remove all Sub-NameStrings from the table.
How do you think we should do this? We can use Oracle 9i/10g or Sql
Server
2000. Considering that there is so much of data and there are so many
possible combinations.
What is the best possible and the fastest solution to solve this kind of
DUPLICATE AND SUB-STRING REMOVAL PROBLEM.
Please Help
Thanks and Regards
Ranjit
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
ForwardSourceID:NT00012D0A
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DISCLAIMER:
This message contains privileged and confidential information and is
intended only for the individual named.If you are not the intended
recipient you should not disseminate,distribute,store,print, copy or
deliver this message.Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and delete this e-mail from your
system.E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted,corrupted,lost,destroyed,arrive late
or incomplete or contain viruses.The sender therefore does not accept
liability for any errors or omissions in the contents of this message
which arise as a result of e-mail transmission. If verification is
required please request a hard-copy version.
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DB2 & UDB email list listserv db2-l LazyDBA home page