Very Complex SQL Query
Hi,
I have three tables
master(m_id m_name)
1 m1
2 m2
3 m3
t1(m_id, int_type)
1 INT(2)
1 INT(3)
t2(m_id, char_type)
1 CHAR(3)
1 CHAR(4)
master table has m_id as a primary key, while this is foreign key in tables t1 and t2. Now i want to get the result like this.
m1 INT(2) INT(3) CHAR(3) CHAR(4)
[All these rows should be converted into columns]
Thanx in Advance
Hi,
Here's a sample based on pivoting:TEST.SQL>CREATE TABLE MASTER
2 (
3 M_ID NUMBER PRIMARY KEY,
4 M_NAME VARCHAR2(5)
5 );
Table created.
TEST.SQL>INSERT INTO MASTER VALUES (1,'m1');
1 row created.
TEST.SQL>INSERT INTO MASTER VALUES (2,'m2');
1 row created.
TEST.SQL>INSERT INTO MASTER VALUES (3,'m3');
1 row created.
TEST.SQL>
TEST.SQL>CREATE TABLE T1
2 (
3 M_ID NUMBER REFERENCES MASTER(M_ID),
4 INT_TYPE VARCHAR2(10)
5 );
Table created.
TEST.SQL>
TEST.SQL>INSERT INTO T1 VALUES (1,'INT(2)');
1 row created.
TEST.SQL>INSERT INTO T1 VALUES (1,'INT(3)');
1 row created.
TEST.SQL>INSERT INTO T1 VALUES (2,'INT(1)');
1 row created.
TEST.SQL>INSERT INTO T1 VALUES (3,'INT(1)');
1 row created.
TEST.SQL>INSERT INTO T1 VALUES (3,'INT(2)');
1 row created.
TEST.SQL>INSERT INTO T1 VALUES (3,'INT(4)');
1 row created.
TEST.SQL>INSERT INTO T1 VALUES (3,'INT(8)');
1 row created.
TEST.SQL>
TEST.SQL>CREATE TABLE T2
2 (
3 M_ID NUMBER REFERENCES MASTER(M_ID),
4 CHAR_TYPE VARCHAR2(10)
5 );
Table created.
TEST.SQL>
TEST.SQL>INSERT INTO T2 VALUES (1,'CHAR(3)');
1 row created.
TEST.SQL>INSERT INTO T2 VALUES (1,'CHAR(4)');
1 row created.
TEST.SQL>INSERT INTO T2 VALUES (3,'CHAR(9)');
1 row created.
TEST.SQL>INSERT INTO T2 VALUES (3,'CHAR(10)');
1 row created.
TEST.SQL>
TEST.SQL>
TEST.SQL>COMMIT;
Commit complete.
TEST.SQL>
TEST.SQL>SELECT M_NAME, MAX(V1), MAX(V2), MAX(V3), MAX(V4), MAX(V5), MAX(V6)
2 FROM
3 (
4 SELECT
5 M_NAME,RN,DECODE(RN,1,VAL) V1,DECODE(RN,2,VAL) V2,DECODE(RN,3,VAL) V3,DECODE(RN,4,VAL) V4,DECODE(RN,5,VAL) V5,DECODE(RN,6,VAL) V6
6 FROM
7 (
8 SELECT M_NAME, VAL, ROW_NUMBER() OVER (PARTITION BY M_NAME ORDER BY VAL) RN
9 FROM
10 (
11 SELECT MASTER.M_NAME, T1.INT_TYPE VAL
12 FROM MASTER, T1
13 WHERE T1.M_ID=MASTER.M_ID
14 UNION ALL
15 SELECT MASTER.M_NAME, T2.CHAR_TYPE VAL
16 FROM MASTER, T2
17 WHERE T2.M_ID=MASTER.M_ID
18 ) SRC
19 )
20 ) TS
21 GROUP BY M_NAME
22 ;
M_NAM MAX(V1) MAX(V2) MAX(V3) MAX(V4) MAX(V5) MAX(V6)
m1 CHAR(3) CHAR(4) INT(2) INT(3)
m2 INT(1)
m3 CHAR(10) CHAR(9) INT(1) INT(2) INT(4) INT(8)Note that this will work only if the max number of columns is 6.
It's possible (I already did it) to build a function that returns a dynamix result set from this query build dynamically. I'll let you do so!
Regards,
Yoann.
Similar Messages
-
Hello,
My question is: I would like to do more complex sql query ( i need to use GROUP BY, HAVING, ORDER BY). Is possible do it with CMP entity bean, or i have to use BMP entity bean or Session bean? Query return about 20-30 items. Can you recommend some design pattern for this situation?
Thanks in advance
Daniel HHello,
My question is: I would like to do more complex sql query ( i need to use GROUP BY, HAVING, ORDER BY). Is possible do it with CMP entity bean, or i have to use BMP entity bean or Session bean? Query return about 20-30 items. Can you recommend some design pattern for this situation?
Thanks in advance
Daniel H -
Complex SQL Query in BPEL DB Adapter
Hi,
Is it possbile to write a complex query in BPEL DB Adapter using "Custom SQL Query"?
I would like to write an IF ELSE condition in the DB Adapter similar what is given below..
IF((SELECT COUNT(*) FROM F5898001 WHERE CT58SRCNME = 'CA_TEST' AND CTJOBNAME = '12345' AND CTEDBT = 'EDBT' AND CTEDSP = 'B') < 1)
BEGIN
insert into f5898001 (CTJOBNAME,CTEDSP,CTEDBT,CT58SRCNME) VALUES (#jobname, #edsp, #edbt, #srcnme)
END.In a single pass no.
You could use a DB link to perform select and return result to BPEL process variable. Put a switch decision depending on result in variable that calls a DB Adapter to perform the insert.
Wouldn't be in a single transaction and not very elegant, but might be a way round. -
SQLEception using Complex SQL Query with Java Studio Creator2 Build(060120)
I am evaluating Java Studio Creator2 for a WEB base application project that will be making SQL queries to an Oracle Database but I have stumble into a problem using complex SQL queries.
I am getting an SQLException "org.apache.jasper.JasperException: java.lang.RuntimeException: java.sql.SQLException: [sunm][Oracle JDBC Driver][Oracle]ORA-00923: FROM keyword not found where expected". I looks like it cut my sql.
The SQL that I am trying to execute is
Select part_name
from table1, table2
where table1.part_nbr = table2.part_nbr
and table2.row_add_dt = (select max(table3.row_add_dt)
from table3
where table3.ser_part_id =table2.ser_part_id)
This is a valid query that it is using 2 different selects to get a part number.
If posible, point me to the best solution were I will be able to make complex SQL queries like the one above and bigger.
Is there any way that I can read an SQL query file instead of inserting the SQL query string into the setCommand()?I have read that document looking for some anwsers on how to make this kind of query. If I try the query that I have above in the query editor ,the query editor will cut off from the last select that is between ().
I beleave, there is a work around using the inner joint or outter join command. I will try them to see If I get the corrent result. If not, then I have to keep on asking for possible solutions.
Anyway, someone in the Creator Team should take a note in adding something like a special criteria in the Add Query Criteria Box for cases like the one I have. The special criteria will be like using another select/from/where to get some result that will be compare.
Girish, Are you in the Sun Creator Team? -
Zimbra login is very slow - SQL query takes 35+ seconds
Hi,
my Zimbra login process remains very slow, 35-40 seconds with only a single user using it. I have Beehive set up as directory synchronized, with about 6500 users in it. However, I and a couple of colleagues the only ones making any use of it for testing. With just one person logging in, the following SQL query takes about 35 seconds to execute:
SELECT /*+ LEADING(rf rf_pp) USE_NL(rf_pp) INDEX_ASC(@rf_connect_by rf@rf_connect_by (ws_real_folders.parent_eid ws_real_folders.eid)) */ RF.ENTERPRISE_ID AS
ENTERPRISE_ID, RF.SITE_ID AS SITE_ID, RF.ENTITY_TYPE AS ENTITY_TYPE, RF.EID AS EID, RF.LOCK_ID AS LOCK_ID, RF.CACHE_ID AS CACHE_ID, RF.CACHE_TS AS
CACHE_TS, RF.CACHE_SQ AS CACHE_SQ, FLOOR(RF.SECURE_CHECK/10) AS ACCESS_TYPES, RF.PARENT_ENTITY_TYPE AS PARENT_ENTITY_TYPE, RF.PARENT_EID AS
PARENT_EID, RF.NAME AS NAME, RF.OWNER_ENTITY_TYPE AS OWNER_ENTITY_TYPE, RF.OWNER_EID AS OWNER_EID, RF.CREATED_ON AS CREATED_ON,
RF.CREATOR_ENTITY_TYPE AS CREATOR_ENTITY_TYPE, RF.CREATOR_EID AS CREATOR_EID, RF.MODIFIEDON AS MODIFIED_ON, RF.MODIFIED_BY_ENTITY_TYPE AS
MODIFIED_BY_ENTITY_TYPE, RF.MODIFIED_BY_EID AS MODIFIED_BY_EID, RF.VISIBILITY AS VISIBILITY, CASE WHEN (BITAND(:B13 , :B12 ) = :B12 ) THEN CAST(MULTISET(
SELECT METADATA_CEN
FROM OCS_ENTITY_METADATA_CENS_2_V META
WHERE META.ENTITY_EID = RF.EID ) AS OCS_COLLAB_ID_TBL_T) ELSE CAST(NULL AS OCS_COLLAB_ID_TBL_T) END AS METADATA_CENS, CASE WHEN
RF_PP.LAST_ACCESSED IS NULL THEN 'N' WHEN RF.MODIFIEDON > RF_PP.LAST_ACCESSED THEN 'U' ELSE NVL(RF_PP.RELATIVE_STATUS, 'N') END AS CHANGE_STATUS,
RF.PROPERTIES AS PROPERTIES_CLOB, RF_PP.PROPERTIES AS VIEWERPROPERTIES_CLOB, RF.DESCRIPTION AS DESCRIPTION
FROM (
SELECT /*+ QB_NAME(rf_connect_by) no_connect_by_cost_based */ RF.ENTERPRISE_ID ENTERPRISE_ID, :B4 SITE_ID, :B3 ENTITY_TYPE, RF.EID EID, RF.LOCK_ID LOCK_ID,
RF.ORA_ROWSCN CACHE_ID, RF.CACHE_TS CACHE_TS, RF.CACHE_SQ CACHE_SQ, RF.PARENT_TYPE PARENT_ENTITY_TYPE, RF.PARENT_EID PARENT_EID, RF.NAME
NAME, RF.OWNER_TYPE OWNER_ENTITY_TYPE, RF.OWNER_EID OWNER_EID, RF.CREATED_ON CREATED_ON, RF.CREATOR_TYPE CREATOR_ENTITY_TYPE,
RF.CREATOR_EID CREATOR_EID, RF.MODIFIED_ON MODIFIEDON, RF.MODIFIED_BY_TYPE MODIFIED_BY_ENTITY_TYPE, RF.MODIFIED_BY_EID MODIFIED_BY_EID,
RF.VISIBILITY VISIBILITY, RF.PROPERTIES PROPERTIES, RF.DESCRIPTION DESCRIPTION, RF.IS_HIDDEN IS_HIDDEN, LEVEL LEVEL_NUM, COALESCE (
(SELECT :B10 * 10 + 1
FROM AC_ENTITIES AEI
WHERE RF.EID = AEI.EID AND ( 1 = DECODE(AEI.SENSITIVITY_EID, :B9 , 1, 0) AND 1 = DECODE(AEI.OWNER_EID, :B8 , 1, 0) AND 1 = DECODE(AEI.AT_READ, :B7 , 1, 0) AND 1 =
DECODE(AEI.AT_DISCOVER, :B6 , 1, 0) AND 1 = DECODE(AEI.LOCAL_ACL_ID, :B5 , 1, 0) ) ) ,
(SELECT ACV.ACCESS_TYPES * 10 + ACV.IS_ALLOWED
FROM AC_CHECK_ONE_OF_V ACV
WHERE ACV.EID = RF.EID ) ) SECURE_CHECK
FROM WS_REAL_FOLDERS RF
WHERE RF.IS_HIDDEN = :B2 START WITH RF.PARENT_EID = :B1 CONNECT BY PRIOR RF.EID = RF.PARENT_EID ) RF, WS_RF_PRVT_PROPERTIES RF_PP
WHERE RF.EID = RF_PP.EID (+) AND :B11 = RF_PP.VIEWER_EID (+) AND 1 = BITAND(RF.SECURE_CHECK, 1) ORDER BY RF.LEVEL_NUMIt has ID atrvjdrmz2v6d in Enterprise Manager, and I've tried tuning it with the SQL tuning advisor in EM. I did the statistics gathering mentioned in another thread yesterday, to see if that helped - doesn't seem liked it. I'm running Database 11.1.0.6 and Beehive 1.5.1 in the build from the day it released.
Any hints? I'll post this to MetaLink as well, unless someone has some immediate idea what's wrong :-)No speedup, the 35-40 seconds is for normal logins - and it's very consistent, at least if the database is otherwise idle. Immediately logging out and back in gives me the same wait, and the same query shows up in the Enterprise Manager interface.
It seems it might be related to Workspaces - from EM:
"PL/SQL Source (Line Number) BEE_CODE.WS_REAL_FOLDER_PKG (2998)" -
Obtain rows from a complex sql query
Hi to all, please somebody who can help me, my scenario is as next:
One table like next
Reservation (table)
Boat (string)
reservation (date)
class (string)
room1_cod (int)
room1 (int)
room2_cod (int)
room2 (int)
room3_cod (int)
room3 (int)
In room(x)_cod , I am saving a client code, in the room(x) , I am saving the price of the room for that client.
example:
LUSITANIA, 2014-3-1, MEDIUM, 0, 0, 145, 345, 0, 0 = client 145 ocupied room 2 paying $345
LUSITANIA, 2014-2-1, MEDIUM, 145, 345, 0, 0, 0, 0 = client 145 ocupied room 1 paying $345
LUSITANIA, 2014-1-1, MEDIUM, 0, 0, 0, 0, 145, 345 = client 145 ocupied room 3 paying $345
how would like to make an sql query for filter :
(Boat, reservation, class... with a reservation start date and finish date and with an specific "client code" find and filter this code into room1_cod , room2_cod and room3_cod .... and maybe do a temporarly table with rows containing (Boat, Reservation,
Class, "client_code" , "client_pay" )
Resulting LIKE:
LUSITANIA, 2014-3-1, MEDIUM, 145, 345
LUSITANIA, 2014-2-1, MEDIUM, 145, 345
LUSITANIA, 2014-1-1, MEDIUM, 145, 345
Please I need your guidance. TKSPlease take a look
SELECT Boat, reservation, class,
case
when room1_cod>0 then 1
when room2_cod>0 then 2
when room3_cod>0 then 3
end as Room,
case
when room1_cod>0 then room1_cod
when room2_cod>0 then room2_cod
when room3_cod>0 then room3_cod
end as client_code,
case
when room1>0 then room1
when room2>0 then room2
when room3>0 then room3
end as client_pay
from
SELECT 'LUSITANIA' AS Boat, CONVERT(DATE,'2014-3-1',121) AS reservation, 'MEDIUM' AS class, 0 AS room1_cod, 0 AS room1, 145 AS room2_cod, 345 AS room2, 0 AS room3_cod, 0 AS room3 ---//client 145 ocupied room 2 paying $345
union all
SELECT 'LUSITANIA' AS Boat, CONVERT(DATE,'2014-2-1',121) AS reservation, 'MEDIUM' AS class, 145 AS room1_cod, 345 AS room1, 0 AS room2_cod, 0 AS room2, 0 AS room3_cod, 0 AS room3 --//= client 145 ocupied room 1 paying $345
union all
SELECT 'LUSITANIA' AS Boat, CONVERT(DATE,'2014-1-1',121) AS reservation, 'MEDIUM' AS class, 0 AS room1_cod, 0 AS room1, 0 AS room2_cod, 0 AS room2, 145 AS room3_cod, 345 AS room3 --//= client 145 ocupied room 3 paying $345
) as Reservation
----Better table design would eliminate multiple columns for each room/client code/rate like the following
SELECT
Boat, reservation, class,
Room,
room_cod as client_code,
room_rate as client_pay
from
SELECT 'LUSITANIA' AS Boat, CONVERT(DATE,'2014-3-1',121) AS reservation, 'MEDIUM' AS class, 2 AS room, 145 AS room_cod, 345 AS room_rate ---//client 145 ocupied room 2 paying $345
union all
SELECT 'LUSITANIA' AS Boat, CONVERT(DATE,'2014-2-1',121) AS reservation, 'MEDIUM' AS class, 1 AS room, 145 AS room_cod, 345 AS room_rate --//= client 145 ocupied room 1 paying $345
union all
SELECT 'LUSITANIA' AS Boat, CONVERT(DATE,'2014-1-1',121) AS reservation, 'MEDIUM' AS class, 3 AS room, 145 AS room_cod, 345 AS room_rate --//= client 145 ocupied room 3 paying $345
) as Reservation
thanks for you effort, best regards -
I am trying to take a complex query that I was running inside of C# code and turn it into a stored proc so that it performs much better. I was doing quite a bit of looping in C# code because I am most familiar with that but I know it ain't the best way to do things. Basically my query does the following:
-Query a table to get a set of table names
-loop over that set of table names to query another table to get some info
-use that info to query another table to find out if there are any results
-if there are results add those to a table to be returned to the caller
The issue I am having is that I don't know how to build the return table so I can pass it back to the calling code. All i need to know is the names of the tables that had at least one hit in my big query.
I am kind of new to this so I may have some things in here that are completely bizarre. I won't be offended if you rip it apart. I know that my out SYS_REFCURSOR will not work as is. The part that says 'SELECT OBJECTID really needs to be telling me the name of the table and not OBJECTID. I want to jam all these table names into a resultset which would really just be a temp table that I create with one field (TableName).
I know it's a lot to ask but if anyone can look at any part of this and give me suggestions I would greatly appreciate it. I'm struggling slowly through PL/SQL trying not to do dumb things when there are easier ways. There is probably a way for me to get rid of this loop but I think I need the dynamic part because I am querying different tables. Thank you very much
CREATE OR REPLACE PROCEDURE "CREAM_USER"."ENVELOPE_INTERSECT"
pMINX IN NUMBER,
pMAXX IN NUMBER,
pMAXY IN NUMBER,
pMINY IN NUMBER,
pRESULTSET OUT SYS_REFCURSOR
AS
BEGIN
DECLARE
SQLSTR VARCHAR2(700);
theLayerID NUMBER;
cursor gi is SELECT TABLE_NAME, OWNER FROM VIEW_GEOINDEXER_TABLES WHERE GEOINDEXED = 1;
theTABLE_NAME varchar2(160);
qTheTABLE_NAME varchar2(160);
theOWNER varchar2(32);
BEGIN
for iLayer in gi loop
theTABLE_NAME := iLayer.TABLE_NAME;
theOWNER := iLayer.OWNER;
qTheTABLE_NAME := '''' || theTABLE_NAME || '''';
theOWNER := '''' || theOWNER || '''';
SQLSTR := 'SELECT LAYER_ID FROM SDE.LAYERS WHERE OWNER = ' || theOWNER || ' AND TABLE_NAME = ' || qTheTABLE_NAME || '';
EXECUTE IMMEDIATE SQLSTR INTO theLAYERID;
SQLSTR := 'SELECT OBJECTID FROM ' || theTABLE_NAME || ' WHERE SHAPE IN
SELECT FID FROM F' || theLayerID || ' WHERE
(' || pMINX || ' >= EMINX AND ' || pMINX || ' <= EMAXX)
OR
(' || pMAXX || ' >= EMINX AND ' || pMAXX || ' <= EMAXX)
AND
(' || pMINY || ' >= EMINY AND ' || pMINY || ' <= EMAXY)
OR
(' || pMAXY || ' >= EMINY AND ' || pMAXY || ' <= EMAXY)
OR
(' || pMINX || ' <= EMINX AND ' || pMAXX || ' >= EMAXX)
AND
(' || pMINY || ' <= EMINY AND ' || pMAXY || ' >= EMAXY)
OPEN pRESULTSET FOR SQLSTR;
END LOOP;
END;
END ENVELOPE_INTERSECT;Looks like you are using dynamic sql but, not using bind variables.
Check out this link (try to ignore the original question) and see how the third post shows you how to use dyanmic sql using the 'USING' construct.
dynamic SQL
HTH,
Rahul. -
Very Urgent: SQL Query Help
Hi,
I have a table which has location ID and text for these locations are stored in a seperate table.
I am running query on table which has location ID but for every location I want it display its text which is stored in another table.
How can this be done with SQL? This is a bit urgent, please help.
Thank you,
Rajamight be a good idea to improve basic SQL knowledge by reading
http://tahiti.oracle.com
http://oreilly.com/catalog/9780596006327/index.html
http://asktom.oracle.com
... whatever ...will give you some new insight about something very urgent -
Very Slow SQL query - Fast in SSMS
We have a very simple query that executes instantly in SSMS, returning about 45,000 rows. Whenever I run the same query on a CFM page it takes about 47 seconds to execute.
I've tried reindexing, turning it into a stored procedure, etc.. but nothing seems to help. My other queries are also running a little slower, but not nearly as noticeable because they are smaller queries.
I have an additional CF10 server that seems to run the query perfectly fine on a test page.
The query is pretty much this:
Select X,Y,Z
FROM TABLE
WHERE BLAH BLAH BLAH
Can someone offer me some advice on what can cause this or how to find the issue?
Thanks!Just an update. It ended up being "something" to do with the CF machine, although still not sure what exactly.
Ended up solving the issue by installing CF on identical hardware and patching to the same windows and CF versions. The site is now running like a champ and loading pages in less than 1 second.
Steve, I have a dynamic filter that I run a query of query on the 45k rows to generate. Once the first option is selected, it takes the distinct rows from the original query were x = selection and there can be 10-12 sub options to narrow down inside of that data. It seems to load much faster this way than by returning to SQL server each time a response is selected.
Thanks for your suggestions. Hopefully we don't have the issue again... whatever it was. -
Hi Fellas,
I am new to query tuning. I have a big query with a TKPROF details. It is just fetching 34 records and taking approx 30 mins.
The TKPROF detail will follow after the query.
SELECT /*+ NO_INDEX(A, RA_CUSTOMER_TRX_N11 ) USE_NL(TYPES,A) */ a.customer_trx_id CUSTOMER_TRX_ID ,
a.trx_number TRX_NUMBER ,
A . INTERFACE_HEADER_ATTRIBUTE5 BILLING_STAGE ,
A . INTERFACE_HEADER_CONTEXT PBRR_TYPE ,
A . INTERFACE_HEADER_ATTRIBUTE11 BILLING_TERM ,
NVL ( TL . SEQUENCE_NUM , 1 ) TERM_SEQUENCE_NUMBER ,
types.type TRX_TYPE ,
l_types.meaning TRX_TYPE_NAME ,
TYPES . ACCOUNTING_AFFECT_FLAG OPEN_RECEIVABLE_FLAG ,
a.trx_date TRX_DATE , SHIP_TO_CUSTOMER_ID SHIP_TO_CUSTOMER_ID ,
SHIP_TO_CONTACT_ID SHIP_TO_CONTACT_ID ,
REMIT_TO_ADDRESS_ID REMIT_TO_ADDRESS_ID ,
A . PRIMARY_SALESREP_ID PRIMARY_SALESREP_ID ,
B . ACCOUNT_NUMBER CUSTOMER_NUMBER ,
A . INTERNAL_NOTES INTERNAL_NOTES ,
A . COMMENTS TRX_COMMENTS ,
PREVIOUS_CUSTOMER_TRX_ID PREVIOUS_CUSTOMER_TRX_ID ,
SHIP_TO_SITE_USE_ID SHIP_TO_SITE_USE_ID ,
NVL ( PRINTING_COUNT , 0 ) PRINTING_COUNT ,
PRINTING_ORIGINAL_DATE PRINTING_ORIGINAL_DATE ,
PRINTING_LAST_PRINTED PRINTING_LAST_PRINTED ,
PRINTING_PENDING PRINTING_PENDING ,
LAST_PRINTED_SEQUENCE_NUM LAST_PRINTED_SEQUENCE_NUMBER ,
START_DATE_COMMITMENT START_DATE_COMMITMENT ,
END_DATE_COMMITMENT END_DATE_COMMITMENT ,
INITIAL_CUSTOMER_TRX_ID INITIAL_CUSTOMER_TRX_ID ,
A . INVOICE_CURRENCY_CODE INVOICE_CURRENCY_CODE ,
A . REASON_CODE CREDIT_HEADER_REASON_CODE_CSTM ,
A . TERM_ID TERM_ID ,
A . SHIP_DATE_ACTUAL SHIP_DATE_ACTUAL ,
A . SHIP_VIA SHIP_VIA ,
A . WAYBILL_NUMBER WAYBILL_NUMBER ,
A . PURCHASE_ORDER PURCHASE_ORDER_NUMBER ,
A . PURCHASE_ORDER_REVISION PURCHASE_ORDER_REVISION ,
A . PURCHASE_ORDER_DATE PURCHASE_ORDER_DATE ,
A . CREATED_BY ORDER_CREATED_BY_CSTM ,
P . DUE_DATE TERM_DUE_DATE_FROM_PS ,
NVL ( TL . RELATIVE_AMOUNT , 100 ) * ( 100 / NVL ( T . BASE_AMOUNT , 100 ) ) TERM_RELATIVE_AMOUNT ,
T . NAME TERM_NAME ,
A . BILL_TO_CUSTOMER_ID BILL_TO_CUSTOMER_ID ,
A . BILL_TO_CONTACT_ID BILL_TO_CONTACT_ID ,
A . BILL_TO_SITE_USE_ID BILL_TO_SITE_USE_ID ,
U_BILL . LOCATION BILL_TO_LOCATION ,
SUBSTRB ( PARTY . PARTY_NAME , 1 , 50 ) BILL_CUST_NAME ,
RTRIM ( RPAD ( LOC . ADDRESS1 , 40 ) ) BILL_ADDRESS1 ,
RTRIM ( RPAD ( LOC . ADDRESS2 , 40 ) ) BILL_ADDRESS2 ,
RTRIM ( RPAD ( LOC . ADDRESS3 , 40 ) ) BILL_ADDRESS3 ,
RTRIM ( RPAD ( LOC . ADDRESS4 , 40 ) ) BILL_ADDRESS4 ,
LOC . CITY BILL_CITY , NVL ( LOC . STATE ,
LOC . PROVINCE ) BILL_STATE ,
LOC . POSTAL_CODE BILL_POSTAL_CODE ,
LOC . COUNTRY BILL_COUNTRY ,
U_BILL . TAX_REFERENCE BILL_SITE_TAX_REFERENCE ,
PARTY . TAX_REFERENCE BILL_CUST_TAX_REFERENCE ,
nvl(amount_line_items_original + decode(a.initial_customer_trx_id, '', 0, nvl(com_adj.amount,0)), to_number(null)) TRX_LINE_AMOUNT ,
nvl(tax_original, to_number(null)) TRX_TAX_AMOUNT ,
nvl(freight_original, to_number(null)) TRX_FREIGHT_AMOUNT ,
p.amount_due_original + decode(a.initial_customer_trx_id, '', 0, nvl(com_adj.amount,0)) TRX_ALL_AMOUNT ,
DECODE ( : P_ORDER_BY , 'TRX_NUMBER' , A . TRX_NUMBER , 'ADJUSTMENT_NUMBER' , A.TRX_NUMBER , 'CUSTOMER' , SUBSTRB ( PARTY . PARTY_NAME , 1 , 50 ) , 'POSTAL_CODE' , LOC . POSTAL_CODE , A . TRX_NUMBER ) ORDER_BY ,
LOC . ADDRESS1 BILL_TO_ADDRESS1 ,
LOC . ADDRESS2 BILL_TO_ADDRESS2 ,
LOC . ADDRESS3 BILL_TO_ADDRESS3 ,
LOC . ADDRESS4 BILL_TO_ADDRESS4 ,
LOC . STATE BILL_TO_STATE ,
LOC . PROVINCE BILL_TO_PROVINCE ,
T . description Term_Description ,
a . org_id ,
a . created_from
FROM
AR_ADJUSTMENTS COM_ADJ,
AR_PAYMENT_SCHEDULES P,
RA_CUST_TRX_LINE_GL_DIST REC,
RA_CUSTOMER_TRX A,
HZ_CUST_ACCOUNTS B,
RA_TERMS T,
RA_TERMS_LINES TL,
RA_CUST_TRX_TYPES TYPES,
AR_LOOKUPS L_TYPES,
HZ_PARTIES PARTY,
HZ_CUST_ACCT_SITES A_BILL,
HZ_PARTY_SITES PARTY_SITE,
HZ_LOCATIONS LOC,
HZ_CUST_SITE_USES U_BILL
WHERE
A.BILL_TO_CUSTOMER_ID = B.CUST_ACCOUNT_ID AND
REC.CUSTOMER_TRX_ID = A.CUSTOMER_TRX_ID AND
REC.LATEST_REC_FLAG = 'Y' AND
REC.ACCOUNT_CLASS = 'REC' AND
P.PAYMENT_SCHEDULE_ID + DECODE ( P.CLASS , 'INV' , 0 , '' ) = COM_ADJ.PAYMENT_SCHEDULE_ID (+) AND
COM_ADJ.SUBSEQUENT_TRX_ID IS NULL AND 'C' = COM_ADJ.ADJUSTMENT_TYPE (+) AND
A.COMPLETE_FLAG = 'Y' AND
A.CUST_TRX_TYPE_ID = TYPES.CUST_TRX_TYPE_ID AND
L_TYPES.LOOKUP_TYPE = 'INV/CM/ADJ' AND
A.PRINTING_OPTION IN ( 'PRI' , 'REP' ) AND
L_TYPES.LOOKUP_CODE = DECODE ( TYPES.TYPE , 'DEP' , 'INV' , TYPES.TYPE ) AND
NVL ( P.TERMS_SEQUENCE_NUMBER , nvl ( TL.SEQUENCE_NUM , 0 ) ) = nvl ( TL.SEQUENCE_NUM , nvl ( p.terms_sequence_number , 0 ) ) AND
DECODE ( P.PAYMENT_SCHEDULE_ID , '' , 0 , NVL ( T.PRINTING_LEAD_DAYS , 0 ) ) = 0 AND
A.BILL_TO_SITE_USE_ID = U_BILL.SITE_USE_ID AND
U_BILL.CUST_ACCT_SITE_ID = A_BILL.CUST_ACCT_SITE_ID AND
A_BILL.party_site_id = party_site.party_site_id AND
B.PARTY_ID = PARTY.PARTY_ID AND
loc.location_id = party_site.location_id AND
NVL ( P.AMOUNT_DUE_REMAINING , 0 ) <> 0 AND
A.CUST_TRX_TYPE_ID = 2526 AND
TYPES.TYPE = 'INV' AND
A.TERM_ID = TL.TERM_ID (+) AND
A.TERM_ID = T.TERM_ID (+) AND
A.CUSTOMER_TRX_ID = P.CUSTOMER_TRX_ID (+) AND
A.PRINTING_PENDING = 'Y' AND
NVL ( TL.SEQUENCE_NUM , 1 ) > NVL ( A.LAST_PRINTED_SEQUENCE_NUM , 0 ) and 1 = 1 AND
NOT EXISTS ( SELECT 'X' from ECE_TP_DETAILS ETD ,
ECE_TP_HEADERS ETH
WHERE
ETH.TP_HEADER_ID = A_BILL.TP_HEADER_ID AND
ETD.TP_HEADER_ID = ETH.TP_HEADER_ID AND
ETD.EDI_FLAG = 'Y' AND
ETD.DOCUMENT_ID = 'INO' AND
ETD.DOCUMENT_TYPE = DECODE ( TYPES.TYPE , 'CM' , DECODE ( A.PREVIOUS_CUSTOMER_TRX_ID , NULL , 'OACM' , 'CM' ) , TYPES.TYPE ) ) AND
A.PRINTING_OPTION IN ( 'PRI' , 'REP' ) AND
T.NAME not like 'PB%' AND
1 = 1 AND
MIT_AR.GE_AR_COAKLEY_ELIGIBLE ( 'NEW' , P.CUSTOMER_TRX_ID , A.ORG_ID ) = 0 AND
A.org_id = TYPES.org_id UNION SELECT /*+ NO_INDEX(A, RA_CUSTOMER_TRX_N11 ) USE_NL(TYPES,A) */
a.customer_trx_id , a.trx_number ,
A . INTERFACE_HEADER_ATTRIBUTE5 ,
A . INTERFACE_HEADER_CONTEXT ,
A . INTERFACE_HEADER_ATTRIBUTE11 ,
NVL ( P . TERMS_SEQUENCE_NUMBER , 1 ) ,
types.type , l_types.meaning ,
TYPES . ACCOUNTING_AFFECT_FLAG ,
a.trx_date ,
A . SHIP_TO_CUSTOMER_ID ,
A . SHIP_TO_CONTACT_ID ,
A . REMIT_TO_ADDRESS_ID ,
A . PRIMARY_SALESREP_ID ,
B . ACCOUNT_NUMBER ,
A . INTERNAL_NOTES ,
A . COMMENTS ,
PREVIOUS_CUSTOMER_TRX_ID ,
SHIP_TO_SITE_USE_ID ,
NVL ( PRINTING_COUNT , 0 ) ,
PRINTING_ORIGINAL_DATE ,
PRINTING_LAST_PRINTED ,
PRINTING_PENDING ,
LAST_PRINTED_SEQUENCE_NUM ,
START_DATE_COMMITMENT ,
END_DATE_COMMITMENT ,
INITIAL_CUSTOMER_TRX_ID ,
A . INVOICE_CURRENCY_CODE ,
A . REASON_CODE ,
A . TERM_ID ,
A . SHIP_DATE_ACTUAL ,
A . SHIP_VIA ,
A . WAYBILL_NUMBER ,
A . PURCHASE_ORDER ,
A . PURCHASE_ORDER_REVISION ,
A . PURCHASE_ORDER_DATE ,
A . CREATED_BY ,
P . DUE_DATE ,
NVL ( TL . RELATIVE_AMOUNT , 100 ) * ( 100 / NVL ( T . BASE_AMOUNT , 100 ) ) ,
T . NAME , A . BILL_TO_CUSTOMER_ID ,
A . BILL_TO_CONTACT_ID ,
A . BILL_TO_SITE_USE_ID ,
U_BILL . LOCATION BILL_TO_LOCATION ,
SUBSTRB ( PARTY . PARTY_NAME , 1 , 50 ) BILL_CUST_NAME ,
RTRIM ( RPAD ( LOC . ADDRESS1 , 40 ) ) ,
RTRIM ( RPAD ( LOC . ADDRESS2 , 40 ) ) ,
RTRIM ( RPAD ( LOC . ADDRESS3 , 40 ) ) ,
RTRIM ( RPAD ( LOC . ADDRESS4 , 40 ) ) ,
LOC . CITY ,
NVL ( LOC . STATE , LOC . PROVINCE ) ,
LOC . POSTAL_CODE ,
LOC . COUNTRY ,
U_BILL . TAX_REFERENCE ,
PARTY . TAX_REFERENCE ,
nvl(amount_line_items_original + decode(a.initial_customer_trx_id, '', 0, nvl(com_adj.amount,0)), to_number(null)) ,
nvl(tax_original, to_number(null)) ,
nvl(freight_original, to_number(null)) ,
p.amount_due_original + decode(a.initial_customer_trx_id, '', 0, nvl(com_adj.amount,0)) ,
DECODE ( : P_ORDER_BY , 'TRX_NUMBER' ,
A . TRX_NUMBER , 'ADJUSTMENT_NUMBER' ,
A.TRX_NUMBER , 'CUSTOMER' ,
SUBSTRB ( PARTY . PARTY_NAME , 1 , 50 ) , 'POSTAL_CODE' ,
LOC . POSTAL_CODE , A . TRX_NUMBER ) ORDER_BY ,
LOC . ADDRESS1 ,
LOC . ADDRESS2 ,
LOC . ADDRESS3 ,
LOC . ADDRESS4 ,
LOC . STATE ,
LOC . PROVINCE ,
T . description ,
a . org_id ,
a . created_from
FROM
RA_TERMS_LINES TL,
RA_CUST_TRX_TYPES TYPES,
AR_LOOKUPS L_TYPES,
HZ_CUST_ACCOUNTS B,
HZ_PARTIES PARTY,
HZ_CUST_SITE_USES U_BILL,
HZ_CUST_ACCT_SITES A_BILL,
HZ_PARTY_SITES PARTY_SITE,
HZ_LOCATIONS LOC,
AR_ADJUSTMENTS COM_ADJ,
RA_CUSTOMER_TRX A,
AR_PAYMENT_SCHEDULES P,
RA_TERMS T
WHERE
A.BILL_TO_CUSTOMER_ID = B.CUST_ACCOUNT_ID
AND P.PAYMENT_SCHEDULE_ID + DECODE ( P.CLASS , 'INV' , 0 , '' ) = COM_ADJ.PAYMENT_SCHEDULE_ID (+) AND
COM_ADJ.SUBSEQUENT_TRX_ID IS NULL AND
'C' = COM_ADJ.ADJUSTMENT_TYPE (+) AND
A.COMPLETE_FLAG = 'Y' AND
A.CUSTOMER_TRX_ID = P.CUSTOMER_TRX_ID AND
A.CUST_TRX_TYPE_ID = TYPES.CUST_TRX_TYPE_ID AND
L_TYPES.LOOKUP_TYPE = 'INV/CM/ADJ' AND
A.PRINTING_OPTION IN ( 'PRI' , 'REP' ) AND
L_TYPES.LOOKUP_CODE = DECODE ( TYPES.TYPE , 'DEP' , 'INV' , TYPES.TYPE ) AND
NVL ( T.PRINTING_LEAD_DAYS , 0 ) > 0 AND
A.BILL_TO_SITE_USE_ID = U_BILL.SITE_USE_ID AND
U_BILL.CUST_ACCT_SITE_ID = A_BILL.CUST_ACCT_SITE_ID AND
A_BILL.PARTY_SITE_ID = PARTY_SITE.PARTY_SITE_ID AND
B.PARTY_ID = PARTY.PARTY_ID AND
LOC.LOCATION_ID = PARTY_SITE.LOCATION_ID AND
NVL ( P.TERMS_SEQUENCE_NUMBER , TL.SEQUENCE_NUM ) = TL.SEQUENCE_NUM AND
NVL ( P.AMOUNT_DUE_REMAINING , 0 ) <> 0 AND
A.CUST_TRX_TYPE_ID = 2526 AND
TYPES.TYPE = 'INV' AND
T.TERM_ID = P.TERM_ID AND
TL.TERM_ID (+) = T.TERM_ID AND
A.PRINTING_PENDING = 'Y' AND
P.TERMS_SEQUENCE_NUMBER > NVL ( A.LAST_PRINTED_SEQUENCE_NUM , 0 ) and 1 = 1 AND
NOT EXISTS ( SELECT 'X' from
ECE_TP_DETAILS ETD ,
ECE_TP_HEADERS ETH
WHERE
ETH.TP_HEADER_ID = A_BILL.TP_HEADER_ID AND
ETD.TP_HEADER_ID = ETH.TP_HEADER_ID AND
ETD.EDI_FLAG = 'Y' AND
ETD.DOCUMENT_ID = 'INO' AND
ETD.DOCUMENT_TYPE = DECODE ( TYPES.TYPE , 'CM' , DECODE ( A.PREVIOUS_CUSTOMER_TRX_ID , NULL , 'OACM' , 'CM' ) , TYPES.TYPE ) ) AND
NVL ( A.PRINTING_OPTION , 'REP' ) IN ( 'PRI' , 'REP' ) AND
T.NAME not like 'PB%' AND 1 = 1 AND
MIT_AR.GE_AR_COAKLEY_ELIGIBLE ( 'NEW' , P.CUSTOMER_TRX_ID , A.ORG_ID ) = 0 AND
A.org_id = TYPES.org_id
ORDER BY 60 ASC,68 ASC,2 ASC,3 ASC,4 ASC,5 ASC,44 ASC
call count cpu elapsed disk query current rows
Parse 1 0.06 0.08 0 364 0 0
Execute 1 5.11 4.98 0 0 0 0
Fetch 18 81.35 1375.73 203636 357435 0 34
total 20 86.52 1380.80 203636 357799 0 34
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 25
Number of plan statistics captured: 1
Rows (1st) Rows (avg) Rows (max) Row Source Operation
34 34 34 SORT UNIQUE (cr=569992 pr=227554 pw=0 time=1658548772 us)
34 34 34 UNION-ALL (cr=569992 pr=227554 pw=0 time=773822949 us)
34 34 34 FILTER (cr=228022 pr=107808 pw=0 time=773820837 us)
34 34 34 FILTER (cr=228022 pr=107808 pw=0 time=773820394 us)
34 34 34 NESTED LOOPS OUTER (cr=228022 pr=107808 pw=0 time=771070499 us)
34 34 34 NESTED LOOPS (cr=227986 pr=107806 pw=0 time=773799735 us)
34 34 34 NESTED LOOPS (cr=227882 pr=107806 pw=0 time=773742298 us)
34 34 34 NESTED LOOPS (cr=227812 pr=107806 pw=0 time=773688021 us)
34 34 34 NESTED LOOPS (cr=227708 pr=107806 pw=0 time=773636699 us)
34 34 34 FILTER (cr=227638 pr=107806 pw=0 time=773566978 us)
4616 4616 4616 NESTED LOOPS OUTER (cr=220679 pr=106836 pw=0 time=823009777 us)
4610 4610 4610 NESTED LOOPS (cr=206836 pr=102712 pw=0 time=623651066 us)
4610 4610 4610 NESTED LOOPS (cr=188367 pr=96450 pw=0 time=531982352 us)
4610 4610 4610 NESTED LOOPS (cr=179145 pr=96449 pw=0 time=530980660 us)
4610 4610 4610 FILTER (cr=165290 pr=96448 pw=0 time=529149297 us)
4610 4610 4610 NESTED LOOPS OUTER (cr=165290 pr=96448 pw=0 time=530066499 us)
4607 4607 4607 NESTED LOOPS (cr=156074 pr=96442 pw=0 time=762671095 us)
4615 4615 4615 NESTED LOOPS (cr=146842 pr=96441 pw=0 time=751255741 us)
4615 4615 4615 NESTED LOOPS (cr=137610 pr=96435 pw=0 time=751144978 us)
4615 4615 4615 NESTED LOOPS (cr=123763 pr=96435 pw=0 time=750949543 us)
4615 4615 4615 TABLE ACCESS BY INDEX ROWID RA_CUSTOMER_TRX_ALL (cr=114531 pr=96435 pw=0 time=750675597 us)
*329687 329687 329687 INDEX RANGE SCAN RA_CUSTOMER_TRX_N17 (cr=6232 pr=6046 pw=0 time=31982795 us)(object id 4788)* 4615 4615 4615 TABLE ACCESS BY INDEX ROWID RA_CUST_TRX_TYPES_ALL (cr=9232 pr=0 pw=0 time=239450 us)
4615 4615 4615 INDEX UNIQUE SCAN RA_CUST_TRX_TYPES_U1 (cr=4617 pr=0 pw=0 time=160139 us)(object id 55731)
4615 4615 4615 TABLE ACCESS BY INDEX ROWID FND_LOOKUP_VALUES (cr=13847 pr=0 pw=0 time=180337 us)
4615 4615 4615 INDEX UNIQUE SCAN FND_LOOKUP_VALUES_U1 (cr=9232 pr=0 pw=0 time=135717 us)(object id 491822)
4615 4615 4615 TABLE ACCESS BY INDEX ROWID RA_TERMS_B (cr=9232 pr=6 pw=0 time=155074 us)
4615 4615 4615 INDEX UNIQUE SCAN RA_TERMS_B_U1 (cr=4617 pr=0 pw=0 time=60566 us)(object id 55734)
4607 4607 4607 TABLE ACCESS BY INDEX ROWID RA_TERMS_TL (cr=9232 pr=1 pw=0 time=181115 us)
4615 4615 4615 INDEX UNIQUE SCAN RA_TERMS_TL_U1 (cr=4617 pr=1 pw=0 time=82153 us)(object id 55755)
4610 4610 4610 TABLE ACCESS BY INDEX ROWID RA_TERMS_LINES (cr=9216 pr=6 pw=0 time=259864 us)
4610 4610 4610 INDEX RANGE SCAN RA_TERMS_LINES_U1 (cr=4609 pr=1 pw=0 time=104110 us)(object id 6703)
4610 4610 4610 TABLE ACCESS BY INDEX ROWID HZ_CUST_SITE_USES_ALL (cr=13855 pr=1 pw=0 time=1350357 us)
4610 4610 4610 INDEX UNIQUE SCAN HZ_CUST_SITE_USES_U1 (cr=9222 pr=1 pw=0 time=434079 us)(object id 44870)
4610 4610 4610 TABLE ACCESS BY INDEX ROWID HZ_CUST_ACCT_SITES_ALL (cr=9222 pr=1 pw=0 time=1024466 us)
4610 4610 4610 INDEX UNIQUE SCAN HZ_CUST_ACCT_SITES_U1 (cr=4612 pr=1 pw=0 time=337477 us)(object id 46883)
4610 4610 4610 TABLE ACCESS BY INDEX ROWID RA_CUST_TRX_LINE_GL_DIST_ALL (cr=18469 pr=6262 pw=0 time=86754686 us)
4610 4610 4610 INDEX RANGE SCAN RA_CUST_TRX_LINE_GL_DIST_N6 (cr=13836 pr=4061 pw=0 time=55844483 us)(object id 1510967)
4616 4616 4616 TABLE ACCESS BY INDEX ROWID AR_PAYMENT_SCHEDULES_ALL (cr=13843 pr=4124 pw=0 time=50689789 us)
4616 4616 4616 INDEX RANGE SCAN AR_PAYMENT_SCHEDULES_N2 (cr=9233 pr=1494 pw=0 time=15169412 us)(object id 4877)
34 34 34 TABLE ACCESS BY INDEX ROWID HZ_CUST_ACCOUNTS (cr=70 pr=0 pw=0 time=24450 us)
34 34 34 INDEX UNIQUE SCAN HZ_CUST_ACCOUNTS_U1 (cr=36 pr=0 pw=0 time=5962 us)(object id 85278)
34 34 34 TABLE ACCESS BY INDEX ROWID HZ_PARTY_SITES (cr=104 pr=0 pw=0 time=58609 us)
34 34 34 INDEX UNIQUE SCAN HZ_PARTY_SITES_U1 (cr=70 pr=0 pw=0 time=31189 us)(object id 45527)
34 34 34 TABLE ACCESS BY INDEX ROWID HZ_LOCATIONS (cr=70 pr=0 pw=0 time=52502 us)
34 34 34 INDEX UNIQUE SCAN HZ_LOCATIONS_U1 (cr=36 pr=0 pw=0 time=23883 us)(object id 45692)
34 34 34 TABLE ACCESS BY INDEX ROWID HZ_PARTIES (cr=104 pr=0 pw=0 time=49042 us)
34 34 34 INDEX UNIQUE SCAN HZ_PARTIES_U1 (cr=70 pr=0 pw=0 time=22106 us)(object id 757879)
0 0 0 TABLE ACCESS BY INDEX ROWID AR_ADJUSTMENTS_ALL (cr=36 pr=2 pw=0 time=19638 us)
0 0 0 INDEX RANGE SCAN AR_ADJUSTMENTS_N3 (cr=36 pr=2 pw=0 time=19271 us)(object id 5473)
0 0 0 NESTED LOOPS (cr=0 pr=0 pw=0 time=9 us)
0 0 0 INDEX UNIQUE SCAN ECE_TP_HEADERS_U1 (cr=0 pr=0 pw=0 time=7 us)(object id 46119)
0 0 0 TABLE ACCESS BY INDEX ROWID ECE_TP_DETAILS (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX UNIQUE SCAN ECE_TP_DETAILS_U2 (cr=0 pr=0 pw=0 time=0 us)(object id 6271)
0 0 0 FILTER (cr=341970 pr=119746 pw=0 time=883424760 us)
0 0 0 FILTER (cr=341970 pr=119746 pw=0 time=883424758 us)
0 0 0 NESTED LOOPS OUTER (cr=341970 pr=119746 pw=0 time=883424757 us)
0 0 0 NESTED LOOPS (cr=341970 pr=119746 pw=0 time=883424752 us)
0 0 0 NESTED LOOPS (cr=341970 pr=119746 pw=0 time=883424749 us)
0 0 0 NESTED LOOPS (cr=341970 pr=119746 pw=0 time=883424742 us)
0 0 0 NESTED LOOPS (cr=341970 pr=119746 pw=0 time=883424740 us)
0 0 0 NESTED LOOPS (cr=341970 pr=119746 pw=0 time=883424735 us)
0 0 0 NESTED LOOPS (cr=341970 pr=119746 pw=0 time=883424731 us)
0 0 0 NESTED LOOPS (cr=341970 pr=119746 pw=0 time=883424726 us)
0 0 0 NESTED LOOPS (cr=341970 pr=119746 pw=0 time=883424724 us)
0 0 0 NESTED LOOPS (cr=341970 pr=119746 pw=0 time=883424721 us)
0 0 0 NESTED LOOPS (cr=341970 pr=119746 pw=0 time=883424715 us)
34 34 34 NESTED LOOPS (cr=341900 pr=119746 pw=0 time=882400482 us)
4615 4615 4615 NESTED LOOPS (cr=123763 pr=93484 pw=0 time=674293279 us)
4615 4615 4615 TABLE ACCESS BY INDEX ROWID RA_CUSTOMER_TRX_ALL (cr=114531 pr=93484 pw=0 time=674030164 us)
329687 329687 329687 INDEX RANGE SCAN RA_CUSTOMER_TRX_N17 (cr=6232 pr=6130 pw=0 time=36621510 us)(object id 4788)
4615 4615 4615 TABLE ACCESS BY INDEX ROWID RA_CUST_TRX_TYPES_ALL (cr=9232 pr=0 pw=0 time=249893 us)
4615 4615 4615 INDEX UNIQUE SCAN RA_CUST_TRX_TYPES_U1 (cr=4617 pr=0 pw=0 time=169485 us)(object id 55731)
34 34 34 TABLE ACCESS BY INDEX ROWID AR_PAYMENT_SCHEDULES_ALL (cr=218137 pr=26262 pw=0 time=310068873 us)
3304 3304 3304 INDEX RANGE SCAN AR_PAYMENT_SCHEDULES_N2 (cr=214841 pr=24355 pw=0 time=283359418 us)(object id 4877)
0 0 0 TABLE ACCESS BY INDEX ROWID RA_TERMS_B (cr=70 pr=0 pw=0 time=829 us)
34 34 34 INDEX UNIQUE SCAN RA_TERMS_B_U1 (cr=36 pr=0 pw=0 time=527 us)(object id 55734)
0 0 0 TABLE ACCESS BY INDEX ROWID HZ_CUST_SITE_USES_ALL (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX UNIQUE SCAN HZ_CUST_SITE_USES_U1 (cr=0 pr=0 pw=0 time=0 us)(object id 44870)
0 0 0 TABLE ACCESS BY INDEX ROWID HZ_CUST_ACCT_SITES_ALL (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX UNIQUE SCAN HZ_CUST_ACCT_SITES_U1 (cr=0 pr=0 pw=0 time=0 us)(object id 46883)
0 0 0 TABLE ACCESS BY INDEX ROWID HZ_CUST_ACCOUNTS (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX UNIQUE SCAN HZ_CUST_ACCOUNTS_U1 (cr=0 pr=0 pw=0 time=0 us)(object id 85278)
0 0 0 TABLE ACCESS BY INDEX ROWID HZ_PARTIES (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX UNIQUE SCAN HZ_PARTIES_U1 (cr=0 pr=0 pw=0 time=0 us)(object id 757879)
0 0 0 TABLE ACCESS BY INDEX ROWID HZ_PARTY_SITES (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX UNIQUE SCAN HZ_PARTY_SITES_U1 (cr=0 pr=0 pw=0 time=0 us)(object id 45527)
0 0 0 TABLE ACCESS BY INDEX ROWID HZ_LOCATIONS (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX UNIQUE SCAN HZ_LOCATIONS_U1 (cr=0 pr=0 pw=0 time=0 us)(object id 45692)
0 0 0 TABLE ACCESS BY INDEX ROWID RA_TERMS_TL (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX UNIQUE SCAN RA_TERMS_TL_U1 (cr=0 pr=0 pw=0 time=0 us)(object id 55755)
0 0 0 TABLE ACCESS BY INDEX ROWID RA_TERMS_LINES (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX RANGE SCAN RA_TERMS_LINES_U1 (cr=0 pr=0 pw=0 time=0 us)(object id 6703)
0 0 0 TABLE ACCESS BY INDEX ROWID FND_LOOKUP_VALUES (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX UNIQUE SCAN FND_LOOKUP_VALUES_U1 (cr=0 pr=0 pw=0 time=0 us)(object id 491822)
0 0 0 TABLE ACCESS BY INDEX ROWID AR_ADJUSTMENTS_ALL (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX RANGE SCAN AR_ADJUSTMENTS_N3 (cr=0 pr=0 pw=0 time=0 us)(object id 5473)
0 0 0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX UNIQUE SCAN ECE_TP_HEADERS_U1 (cr=0 pr=0 pw=0 time=0 us)(object id 46119)
0 0 0 TABLE ACCESS BY INDEX ROWID ECE_TP_DETAILS (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX UNIQUE SCAN ECE_TP_DETAILS_U2 (cr=0 pr=0 pw=0 time=0 us)(object id 6271)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
row cache lock 6 0.00 0.00
SQL*Net message to client 18 0.00 0.00
SQL*Net more data to client 2 0.00 0.00
gc current block 2-way 5375 0.02 3.76
gc cr grant 2-way 49175 0.05 24.09
db file sequential read 203636 0.51 1289.70
gcs drm freeze in enter server mode 7 0.28 1.30
latch: KCL gc element parent latch 4 0.00 0.00
gc remaster 2 0.07 0.12
latch: gcs resource hash 26 0.00 0.00
latch free 1 0.00 0.00
gc cr block 2-way 9 0.00 0.00
latch: cache buffers chains 1 0.00 0.00
SQL*Net message from client 18 0.00 0.00
Thanks in Advance..Hi,
it looks like your problem stems from the wrong choice of the driving table:
4615 4615 4615 NESTED LOOPS (cr=123763 pr=96435 pw=0 time=750949543 us)
4615 4615 4615 TABLE ACCESS BY INDEX ROWID RA_CUSTOMER_TRX_ALL (cr=114531 pr=96435 pw=0 time=750675597 us)
329687 329687 329687 INDEX RANGE SCAN RA_CUSTOMER_TRX_N17 (cr=6232 pr=6046 pw=0 time=31982795 us)(object id 4788) 4615 4615 4615 TABLE ACCESS BY INDEX ROWID RA_CUST_TRX_TYPES_ALL (cr=9232 pr=0 pw=0 time=239450 us)
4615 4615 4615 INDEX UNIQUE SCAN RA_CUST_TRX_TYPES_U1 (cr=4617 pr=0 pw=0 time=160139 us)(object id 55731)
4615 4615 4615 TABLE ACCESS BY INDEX ROWID FND_LOOKUP_VALUES (cr=13847 pr=0 pw=0 time=180337 us)Here, you are spending 750 seconds retriveing 329k rows, 98% of which are rejected on the next step. And the reason this is happening is because the optimizer underestimates the cardinatlity of this step by a factor of x50 (6.2k estimated, 329k actual value). Find out why this is happening or post relevant diagnostic information here (predicates, columns stats etc.), and fix this -- this should make your query twice as fast.
The second half is coming from the SORT UNIQUE step. This looks weird: why on Earth it would take over 800 seconds to sort 34 rows?! Maybe there is something in the plan that I'm missing -- it's really hard to read because it's not formatted. Please obtain a plan with rowsource stats using dbms_xplan.display_cursor and post it here (google dbms_xplan.display_cursor allstats last if not sure how to do that).
Best regards,
Nikolay -
Hi,
I was wondering if I could have some help with the query I have below for this general data set, please? I need to do it in a single SQL statement. We're currently running Oracle 10g. The piece I'm struggling with is identifying that the person has all the items in a collection and to include the collection in the resulting collection of items.
persons_items
person item
Ted cup
Ted saucer
Ted plate
Ted fork
Alice book
Alice thimble
Alice knife
Alice cup
Joe cup
Joe saucer
Joe plate
Joe knife
Joe fork
Joe spoon
Jessica spatula
Jessica dish
collections
collection_name item
crockery cup
crockery saucer
crockery plate
cutlery knife
cutlery fork
cutlery spoon
Query:
What single items and collections does Ted have? fork, crockery
What single items and collections does Alice have? book, thimble, knife, cup
What single items and collections does Joe have? crockery, cutlery
What single items and collections does Jessica have? spatula, dish
Thanks in advance.
PatExpanding on Brendan's solution...
For 11g:
SQL> ed
Wrote file afiedt.buf
1 WITH person_items AS (
2 SELECT 'Ted' person, 'cup' item FROM DUAL UNION
3 SELECT 'Ted', 'saucer' FROM DUAL UNION
4 SELECT 'Ted', 'plate' FROM DUAL UNION
5 SELECT 'Ted', 'fork' FROM DUAL UNION
6 SELECT 'Alice', 'book' FROM DUAL UNION
7 SELECT 'Alice', 'thimble' FROM DUAL UNION
8 SELECT 'Alice', 'knife' FROM DUAL UNION
9 SELECT 'Alice', 'cup' FROM DUAL UNION
10 SELECT 'Joe', 'cup' FROM DUAL UNION
11 SELECT 'Joe', 'saucer' FROM DUAL UNION
12 SELECT 'Joe', 'plate' FROM DUAL UNION
13 SELECT 'Joe', 'knife' FROM DUAL UNION
14 SELECT 'Joe', 'fork' FROM DUAL UNION
15 SELECT 'Joe', 'spoon' FROM DUAL UNION
16 SELECT 'Jessica', 'spatula' FROM DUAL UNION
17 SELECT 'Jessica', 'dish' FROM DUAL
18 ), collections AS (
19 SELECT 'crockery' collection_name, 'cup' item FROM DUAL UNION
20 SELECT 'crockery', 'saucer' FROM DUAL UNION
21 SELECT 'crockery', 'plate' FROM DUAL UNION
22 SELECT 'cutlery', 'knife' FROM DUAL UNION
23 SELECT 'cutlery', 'fork' FROM DUAL UNION
24 SELECT 'cutlery', 'spoon' FROM DUAL
25 ), person_item_colls AS (
26 SELECT pi.person, pi.item, co.collection_name,
27 Count(*) OVER (PARTITION BY pi.person, co.collection_name) n_col
28 FROM person_items pi
29 LEFT JOIN collections co
30 ON co.item = pi.item
31 )
32 select person, listagg(collection_name,',') within group (order by collection_name) as collections
33 from (
34 SELECT DISTINCT person, collection_name
35 FROM person_item_colls
36 WHERE collection_name IS NOT NULL
37 AND n_col > 1
38 UNION ALL
39 SELECT person, item
40 FROM person_item_colls
41 WHERE collection_name IS NULL
42 OR n_col = 1
43 )
44* group by person
SQL> /
PERSON COLLECTIONS
Alice book,cup,knife,thimble
Jessica dish,spatula
Joe crockery,cutlery
Ted crockery,forkFor 10g:
SQL> ed
Wrote file afiedt.buf
1 WITH person_items AS (
2 SELECT 'Ted' person, 'cup' item FROM DUAL UNION
3 SELECT 'Ted', 'saucer' FROM DUAL UNION
4 SELECT 'Ted', 'plate' FROM DUAL UNION
5 SELECT 'Ted', 'fork' FROM DUAL UNION
6 SELECT 'Alice', 'book' FROM DUAL UNION
7 SELECT 'Alice', 'thimble' FROM DUAL UNION
8 SELECT 'Alice', 'knife' FROM DUAL UNION
9 SELECT 'Alice', 'cup' FROM DUAL UNION
10 SELECT 'Joe', 'cup' FROM DUAL UNION
11 SELECT 'Joe', 'saucer' FROM DUAL UNION
12 SELECT 'Joe', 'plate' FROM DUAL UNION
13 SELECT 'Joe', 'knife' FROM DUAL UNION
14 SELECT 'Joe', 'fork' FROM DUAL UNION
15 SELECT 'Joe', 'spoon' FROM DUAL UNION
16 SELECT 'Jessica', 'spatula' FROM DUAL UNION
17 SELECT 'Jessica', 'dish' FROM DUAL
18 ), collections AS (
19 SELECT 'crockery' collection_name, 'cup' item FROM DUAL UNION
20 SELECT 'crockery', 'saucer' FROM DUAL UNION
21 SELECT 'crockery', 'plate' FROM DUAL UNION
22 SELECT 'cutlery', 'knife' FROM DUAL UNION
23 SELECT 'cutlery', 'fork' FROM DUAL UNION
24 SELECT 'cutlery', 'spoon' FROM DUAL
25 ), person_item_colls AS (
26 SELECT pi.person, pi.item, co.collection_name,
27 Count(*) OVER (PARTITION BY pi.person, co.collection_name) n_col
28 FROM person_items pi
29 LEFT JOIN collections co
30 ON co.item = pi.item
31 )
32 select person, ltrim(sys_connect_by_path(collection_name,','),',') as collections
33 from (
34 select person, collection_name, row_number() over (partition by person order by collection_name) as rn
35 from (
36 SELECT DISTINCT person, collection_name
37 FROM person_item_colls
38 WHERE collection_name IS NOT NULL
39 AND n_col > 1
40 UNION ALL
41 SELECT person, item
42 FROM person_item_colls
43 WHERE collection_name IS NULL
44 OR n_col = 1
45 )
46 )
47 where connect_by_isleaf = 1
48 connect by person = prior person and rn = prior rn + 1
49* start with rn = 1
SQL> /
PERSON COLLECTIONS
Alice book,cup,knife,thimble
Jessica dish,spatula
Joe crockery,cutlery
Ted crockery,fork -
Your estimated performance of a very simple SQL query
Hi there..
Sometimes it seems hard to find answers for the most simple questions so I hope you can help me and be overbearing ;)
I am going to have a table with a few million records in it, 30-40 columns of which 80% has data, indexes on maybe 10 columns (certainly the columns I am querying), less than ten thousand new records a day with a variety of different column values and using Oracle 10 or 11.
I am going to be running a single SQL SELECT statement quite regularily against these records to retrieve all records whose value of a single column is the same (and specified in my WHERE clause)
It will be a query like this; SELECT * FROM person where city = 'Amsterdam' AND
The column 'city' will have a simple index on it. 4-8 records will have the same value (e.g. there will only be up to 8 rows where city is 'Amsterdam' in the above example) which means that with 5 million records I will probably have between 625,000 and 1,250,000 "sets" that I am querying and retrieving per SQL. Thed atatype could be varchar or number - not sure yet.
I will retrieve the same data a lot but generally also access all the other data on a regular basis.
How should I expect this to perform? Always fast I imagine because will there will be any table scans do we think? I don't have to think about partitioning of too regular statistic calculation or anything? Anything to watch out for?
Any feedback would be greatly appreciated.
Thanks a lot in advance.
DanielIt's impossible to tell without seeing a true structure and indexes etc.
It sounds ok at a first read. High selectivity, low cardinality, low skewing. Obviously, ensuring stats are up to date on a reasonably regular basis is a good idea, especially with 10,000+ records added daily. I would expect it to perform ok. -
Continuation-Please help with a complex sql query
Hi all,
Thanks a lot for your suggestions and inputs in the last thread of this post.
With the help of your suggested approach,i went ahead and was able to get some more data in the format as needed..I worked on gradually adding one table after another exactly as the data is required stepwise.But,still I am facing issues with displaying them.
there are many issues I am not able to do and would appreciate if you please have a look at my latest modified SELECT given below and help me writing it to get the display as needed.
Below,is the attempted query i tried out using your inputs.But,am stuck and need your help in writing it.
**Here,there is 1 ->MANY lines for the t_objective_id--->This has many learning_record_ids which i want to group by the unique objective_id.
Also,prior to that,there is a tplan_id---->which has MANY t_objective_id's
SELECT DECODE (LAG (firstname, 1, 0) OVER (ORDER BY firstname),
firstname, ' ',
firstname
) firstname,
DECODE (LAG (emplid, 1, 0) OVER (ORDER BY emplid),
emplid, ' ',
emplid
) emplid,
DECODE (LAG (tplan_name, 1, 0) OVER (ORDER BY tplan_name),
tplan_name, ' ',
tplan_name
) tplan_name,
tplan_id,
DECODE (LAG (activities, 1, 0) OVER (ORDER BY activities),
activities, ' ',
activities
) activities,
activities,
--activities,
DECODE (LAG (t_objective_id, 1, 0) OVER (ORDER BY t_objective_id),
t_objective_id, ' ',
t_objective_id
) t_objective_id,
completed_activities,required_credits,
DECODE (LAG (learning_record_id, 1, 0) OVER (ORDER BY learning_record_id),
learning_record_id, ' ',
learning_record_id
) learning_record_id,
catalog_item_name,catalog_item_type
FROM (SELECT test_cp.firstname, test_op.emplid, tp.tplan_name,tp.tplan_id,FN_TP_GET_CMPLTD_ACT_CNT(tp.tplan_id,test_lp.lp_person_id,'1862') activities,
test_tpo.t_objective_id,
( fn_tp_obj_comp_req_act_cdt (test_lp.lp_person_id,
tp.tplan_id,
test_tpo.t_objective_id,
tp.is_credit_based
+ fn_tp_obj_comp_opt_act_cdt (test_lp.lp_person_id,
tp.tplan_id,
test_tpo.t_objective_id,
tp.is_credit_based
) completed_activities,test_tpo.required_credits,lr.learning_record_id,lr.catalog_item_name,lr.catalog_item_type
FROM test_learning_plan test_lp,
test_training_plan tp,
test_person test_cp,
test_org_person test_op,test_tp_learning_activity test_tplplr,
test_tp_objective test_tpo,test_learning_record lr,test_train_obj_activity tpobjact
WHERE test_lp.lp_person_id = '1862188559'
AND test_cp.person_id = test_lp.lp_person_id
AND tp.tplan_id = 'tplan200811200632352287621599'
AND test_tpo.t_objective_id = tpobjact.t_objective_id
AND test_lp.LP_CATALOG_HIST_ID = tp.tplan_id
AND test_tplplr.tp_lp_lr_id =test_lp.learning_plan_id
AND test_tplplr.activity_lp_lr_id = lr.learning_record_id
AND lr.LR_CATALOG_HISTORY_ID = tpobjact.activity_id
AND test_op.o_person_id = test_cp.person_id
AND test_tpo.tplan_id = tp.tplan_id)
If we see the outer SELECT ---then one of the main issues is for EACH t_objective_id----->There are n learning_record_ids.
But,this select only shows 1 learning_record_id for each objective_id which is wrong.
Similarly,the data displayed isnot proper.
Below is the way I am getting the data now from the above SELECT.
Note:- FIRSTNAME is not correctly displayed.
FIRSTNAME EMPLID TPLAN_NAME TPLAN_ID ACTIVITIES ACTIVITIES_1
001 TP1 tplan1 5 5
TESTNAME tplan1 5
Continuation of the other columns of the same rows--**couldnt paste it properly so.
T_OBJECTIVE_ID COMPLETED_ACTIVITIES REQUIRED_CREDITS LEARNING_RECORD_ID CATALOG_ITEM_NAME CATALOG_ITEM_TYPE
obj1 1 5 lr1 C1 Course
obj2 4 4Something like this might solve your problem ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Elapsed: 00:00:00.00
satyaki>
satyaki>
satyaki>select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7521 WARD SALESMAN 7698 22-FEB-81 226.88 500 30
7654 MARTIN SALESMAN 7698 28-SEP-81 1815 1400 30
7788 SCOTT ANALYST 7566 19-APR-87 598.95 20
7839 KING PRESIDENT 17-NOV-81 7260 10
7844 TURNER SALESMAN 7698 08-SEP-81 2178 0 30
7876 ADAMS CLERK 7788 23-MAY-87 159.72 20
7900 JAMES CLERK 7698 03-DEC-81 1379.4 30
7902 FORD ANALYST 7566 03-DEC-81 5270.76 20
7934 MILLER CLERK 7782 23-JAN-82 1887.6 10
7566 Smith Manager 7839 23-JAN-82 1848 0 10
7698 Glen Manager 7839 23-JAN-82 1848 0 10
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7599 BILLY ANALYST 7566 10-JUN-09 4500 30
12 rows selected.
Elapsed: 00:00:00.00
satyaki>
satyaki>
satyaki>
satyaki>
satyaki>select decode(lag(job,1,null) over(order by job),'CLERK','CK',
2 'SALESMAN', 'SM',
3 'ANALYST','AL',
4 'BO') res
5 from emp;
RE
BO
AL
AL
AL
CK
CK
CK
BO
BO
BO
SM
RE
SM
12 rows selected.
Elapsed: 00:00:00.01
satyaki>
satyaki>
satyaki>select MAX(decode(lag(job,1,null) over(order by job),'CLERK','CK',
2 'SALESMAN', 'SM',
3 'ANALYST','AL',
4 'BO')) res
5 from emp;
select MAX(decode(lag(job,1,null) over(order by job),'CLERK','CK',
ERROR at line 1:
ORA-30483: window functions are not allowed here
Elapsed: 00:00:00.01
satyaki>
satyaki>select MAX(res)
2 from (
3 select decode(lag(job,1,null) over(order by job),'CLERK','CK',
4 'SALESMAN', 'SM',
5 'ANALYST','AL',
6 'BO') res
7 from emp
8 );
MA
SM
Elapsed: 00:00:00.00
satyaki>
satyaki>Regards.
Satyaki De. -
View object editor for complex sql query in expert mode
I find not convenient that the editor is modal so we cannot browse tables or procedure functions definition and that it is not possible to close it even the statement is not correct (to search for exact naming etc ...).
May a way will be to show a list of corresponding database objects during typing like the java edit with the classesI filed enhancement request # 6062896 to track this suggestion. thanks.
At a minimum, by production, we plan to re-enable the query-builder that was offered in 10.1.3, which should help with formulating queries in terms of table/column names. -
Repair Problem with Excel Removing All But First External SQL Query Tables
We have an Excel 2007 XLSX workbook that we created for doing some business analysis from the SQL database that contains data from our MRP system. It started as a single sheet with one data connection running a SQL query. The data comes into
the spreadsheet as a table and there are some basic row and column sums being done.
After getting the first version up and running without problems, we decided to add some additional sheets to the same workbook. Since each of these additional sheets had only slight variations to the SQL query and the formatting was all to be the same, we
simply copied the first sheet and modified the data connection for each successive sheet (each copy automatically created a copy of the data connection as well). Everything seemed to be up and running properly, so we saved and closed the workbook.
A little bit later, the same workbook was re-opened and Excel reported that "Excel found unreadable content in '<file name>'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes." If Yes
is clicked, then Excel indicates the repairs that were made. Only one was made for each sheet beyond the first and that was "Removed Part: /xl/queryTables/queryTable2.xml part. (External data range)". The result was that the data connection
was deleted from every sheet other than the first and only static data left in place.
We thought it might have actual been some corruption, so we deleted the static sheets and recreated them the same way. After saving and closing, re-opening the file resulted in the same problem. It seems that Excel is somehow saving data that it can't read
when it opens. I would think it could be something in the SQL query, but all sheets have essentially the same SQL query, so I'm not sure why the first sheet survives. As a result, I think it must be something that it does in copying the sheet and the corresponding
data connections, but I'm not sure.
I think this might be some kind of bug, but would like to know if anyone else has encountered a similar problem and found a solution. A few internet searches didn't give me much to check out.
Thanks in advance,
indyvqlKR,
Thanks for your response. I don't think it applies in this case since the file was created brand new in Excel 2007 and used in the same. There was no 3rd-party program involved. I'm also not migrating from 2003 to 2010 as the stellarinfo.com article
suggests. Some of the other suggestions there also don't make any difference as all the data links are lost on opening the worksheet, so copying and pasting doesn't do any good.
I tried to create a simple example by creating a new workbook with a sheet with a very simple SQL query ("select * from X where a > b"), but in that example it worked fine. I'm guessing there is something key about the much more complex SQL query
in my original file with the problem, but I'm not sure why it would only affect copies of the data connection and not the original data connection itself.
Thanks,
indyvql
Maybe you are looking for
-
IPhone 3G still connecting to 2.4 GHz N network. How is that possible?
I have an Extreme N that is set to 2.4 GHz N and extended with an Express N. Question is, how is it possible that my iphone 3G and touch are still connecting to WiFi? Should they not even see my N network since the are both G?
-
My Multiple Saves On A Flash File Gone? [URGENT HELP NEEDED]
Hey guys, I am very disappointed with the fact that I've been working on a school project on a Flash file for numerous days, and yesterday, I was close to completetion when I found out that none my saves were updated. Basically, I spent hours working
-
Hi, How can i send the HTML emails with the scripts.
-
Why can't I Restore my Ipod?
You must uninstall iTunes and all other services by Apple. If that doesn't work schedule an appointment with an Apple store in your local area. You may also try restarting your computer!
-
Xorg freeze when my mouse moves from one screen to another :/
Hello, I have a computer with two graphics cards nvidia: - GeForce 7300 SE/7200 GS on a PCI Express port - GeForce FX 5200 sur on a PCI port I use 3 screens: - 2 on PCI Express card, one on the DVI port and one on the VGA port - 1 on the VGA port of