Home » SQL & PL/SQL » SQL & PL/SQL » query required...
query required... [message #275823] Mon, 22 October 2007 19:12 Go to next message
Messages: 2
Registered: October 2007
Junior Member
I need to extract data from a table having some million rows and the table dont have primary keys. I need data for like 1000 customers who belong to like distinct 40 divisions. So I want to extract data for a unique combination of division number and customer number. I tried to do it by using || operator. i concatenated the given customer nbr and divsion number(ie the condition) and checked it with the concatenated data of the master table. But I am wondering this will give only disticnt combinations or not and moreover the execution time it is taking is also very long. Can anybody please suggest any other way to do this

Thanks in advance!

[Updated on: Mon, 22 October 2007 19:14]

Report message to a moderator

Re: query required... [message #275824 is a reply to message #275823] Mon, 22 October 2007 19:41 Go to previous message
Messages: 25570
Registered: January 2009
Location: SoCal
Senior Member

Post table DESCRIPTION from SQL*Plus using CUT & PASTE; plus <code tags>

Which indexes on which columns for this table.

Post your SQL & EXPLAIN PLAN using <code tags>
Previous Topic: FOR UPDATE
Next Topic: alternative to dbms_lock.sleep()
Goto Forum:

Current Time: Sat Aug 19 00:46:16 CDT 2017

Total time taken to generate the page: 0.15770 seconds