RE: Help Need

2001-08-02 Thread Thomas, Kevin

Hi,
 
This statement will get you the userid and the number of times it is
duplicated. Then it's just a case of inserting the value at the desired
location. Although this does mean that you are either going to have a column
with lots of null values or lots of repeated values...Doesn't really make a
lot of sense either way.
 
select userid,
 count(userid)-1
   from user
 group by user_id;
 
Regards,
Kev.

-Original Message-
Sent: 02 August 2001 12:40
To: Multiple recipients of list ORACLE-L



Hi DBA Gurus, 

I have a table called user.. 

It has userid, firstname, lastname, city, address, telephone, email 

There are some userid which have been reentered .. I would like to insert a
column called repeats and take the number of times the userid is repeated

How to I go about it 

Create table usercheck as (userid, firstname, repeated,lastname, city,
address, telephone, email) 
As 
Select userid, firstname, count(*) userid as repeated,,lastname, city,
address, telephone, email) 
From user; 

Something like this.. 

For example the userid of Deewaker is 123123 and he as been inserted 5 times
in the table USER the Repeated should give a count of 4.

Please help me. 

with warm regards, 

Deewaker G. V. 

Baazee.com India Pvt. Ltd. 
*: 4611323 Extn: 216 
Fax : 4611324 

Deewaker G.V..vcf 

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Thomas, Kevin
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Help need

2001-07-27 Thread Jäck Stephan

Deewaker, 
information you find with this select-stmt, perhaps you need to format the
output.
Depending on what you're looking for you should select either from the view:
user_indexes
all_indexes
dba_indexes
 
 select
   table_name,
   index_name,
   tablespace_name
from user_indexes 
group by table_name, index_name, tablespace_name;
 
 
TGIF
 
Stephan

-Original Message-
Sent: Friday, July 27, 2001 10:50 AM
To: Multiple recipients of list ORACLE-L



HI DBA Guru's 

I wanted to know all the Index names under respective table spaces 

For example 

Tablespace is Production 
Table name : customer, item, supplier 
index Names  idx_customer_custid 
  idx_customer_name 
  idx_item_itemid 
  idx_item_name 
  idx_supplier_itemid 
  idx_supplier_name 

Tablespace is Quality 
Table name : customer, item, supplier 
index Names  idx_customer_custid 
  idx_customer_name 
  idx_item_itemid 
  idx_item_name 
  idx_supplier_itemid 
  idx_supplier_name 

Tablespace is Development 
Table name : customer, item, supplier 
index Names  idx_customer_custid 
  idx_customer_name 
  idx_item_itemid 
  idx_item_name 
  idx_supplier_itemid 
  idx_supplier_name 

with warm regards, 

Deewaker G. V. 

 

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: =?iso-8859-1?Q?J=E4ck_Stephan?=
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: Help need

2001-07-27 Thread Saurabh Sharma
Title: Help need



Hi deewakar,

hope this will help..

SELECT 
TABLESPACE_NAME,TABLE_NAME,INDEX_NAME FROM DBA_INDEXESORDER BY 1,2,3/

Saurabh Sharma
Oracle DBA
[EMAIL PROTECTED]http://www.geocities.com/saurabh00pc/stride.html

  - Original Message - 
  From: 
  Deewaker 
  G.V. 
  To: Multiple recipients of list ORACLE-L 
  Sent: Friday, July 27, 2001 2:20 PM
  Subject: Help need
  
  HI DBA Guru's 
  I wanted to know all the Index 
  names under respective table spaces 
  For example 
  Tablespace is Production 
   Table name : customer, item, supplier  
  index Names idx_customer_custid 
   

  idx_customer_name  

  idx_item_itemid  

  idx_item_name  

  idx_supplier_itemid  

  idx_supplier_name  
  Tablespace is Quality 
   Table name : customer, item, supplier  
  index Names idx_customer_custid 
   

  idx_customer_name  

  idx_item_itemid  

  idx_item_name  

  idx_supplier_itemid  

  idx_supplier_name 
  Tablespace is Development 
   Table name : customer, item, supplier  
  index Names idx_customer_custid 
   

  idx_customer_name  

  idx_item_itemid  

  idx_item_name  

  idx_supplier_itemid  

  idx_supplier_name 
  with warm regards, 
  Deewaker G. V. 
  Baazee.com India Pvt. Ltd. 
  (: 4611323 Extn: 216 Fax : 4611324 
  Deewaker G.V..vcf