Help me to solve this Query

Hi All,
This is Sindhu..
Here i got an error while excuting the following query related to BLOB data types in Oracle 11g.
I have to compare two blobs, because my report needs that.
for this..1st i ran the following package..
@ORACLE_HOME/rdbms/admin/dbmslob.sql
then i did this...
declare
src_lob BFILE := &src_lob;
amount INTEGER := &amount;
dest_offset INTEGER :=1;
src_offset INTEGER :=1;
dest_lob BLOB := &dest_lob;
BEGIN
dbms_lob.loadfromfile
dest_lob,
amount,
src_lob,
src_offset,
dest_offset
end;
SQL> /
Enter value for src_lob: 0820303623ECCFF8DCD9E0DFF11FDF1E1E7C3E6450E444E2E683A3D
B03FF7B7CFF34FC24244724CF07CBDBC8EB80C034000436007E018801016B01FEFFFEFEFEFE0F7F0
D07891FF198F1E9E1F304730C
old 2: 2 src_lob BFILE := &src_lob;
new 2: 2 src_lob BFILE := 0820303623ECCFF8DCD9E0DFF11FDF1E1E7C3E6450E444E2E
683A3DB03FF7B7CFF34FC24244724CF07CBDBC8EB80C034000436007E018801016B01FEFFFEFEFEF
E0F7F0D07891FF198F1E9E1F304730C;
Enter value for amount: 18446744073709551615
old 3: 3 amount INTEGER := &amount;
new 3: 3 amount INTEGER := 18446744073709551615;
Enter value for dest_lob: 8F2F1FE032E0E0C8C00CF91E2E1F0EDBDDF2D13292203E61614161
80C0E689FFAEFFD7FEDF38FC3818013941F1C7C4C74FF3FF90F218000D1CAD9F89ED00E000024404
D76DDFD6DF935F5B0E5C868E87
old 6: 6 dest_lob BLOB := &dest_lob;
new 6: 6 dest_lob BLOB := 8F2F1FE032E0E0C8C00CF91E2E1F0EDBDDF2D13292203E616
1416180C0E689FFAEFFD7FEDF38FC3818013941F1C7C4C74FF3FF90F218000D1CAD9F89ED00E0000
24404D76DDFD6DF935F5B0E5C868E87;
ERROR:
ORA-00972: identifier is too long
SQL> declare
2 lob_1 BLOB := &lob_1;
3 lob_2 BLOB := &lob_2;
4 amount INTEGER := 18446744073709551615;
5 offset1 INTEGER :=1;
6 offset2 INTEGER :=1;
7 templob INTEGER;
8 BEGIN
9 templob :=dbms_lob.compare(lob_1,lob_2,amount,offset1,offset2);
10 if (templob !=0 ) then
11 dbms_output.put_line('Files Are Different');
12 else
13 dbms_output.put_line('Files Are Same');
14 end if;
15 end;
16 /
Enter value for lob_1: 0820303623ECCFF8DCD9E0DFF11FDF1E1E7C3E6450E444E2E683A3DB0
3FF7B7CFF34FC24244724CF07CBDBC8EB80C034000436007E018801016B01FEFFFEFEFEFE0F7F0D0
7891FF198F1E9E1F304730C
old 2: lob_1 BLOB := &lob_1;
new 2: lob_1 BLOB := 0820303623ECCFF8DCD9E0DFF11FDF1E1E7C3E6450E444E2E683A3DB0
3FF7B7CFF34FC24244724CF07CBDBC8EB80C034000436007E018801016B01FEFFFEFEFEFE0F7F0D0
7891FF198F1E9E1F304730C;
Enter value for lob_2: 8F2F1FE032E0E0C8C00CF91E2E1F0EDBDDF2D13292203E6161416180C
0E689FFAEFFD7FEDF38FC3818013941F1C7C4C74FF3FF90F218000D1CAD9F89ED00E000024404D76
DDFD6DF935F5B0E5C868E87
old 3: lob_2 BLOB := &lob_2;
new 3: lob_2 BLOB := 8F2F1FE032E0E0C8C00CF91E2E1F0EDBDDF2D13292203E6161416180C
0E689FFAEFFD7FEDF38FC3818013941F1C7C4C74FF3FF90F218000D1CAD9F89ED00E000024404D76
DDFD6DF935F5B0E5C868E87;
ERROR:
ORA-00972: identifier is too long
i do not know why i got this problem.. is there any error in my program..
lobmaxsize=4GB
how to increase the size of the data type.
Please Help me.
Thank You.

Hi Sindhu,
Your problem has not to with lob size.
The error ORA-00972: identifier is too long
tells you that
0820303623ECCFF8DCD9E0DFF11FDF1E1E7C3E6450E444E2E683A3D
B03FF7B7CFF34FC24244724CF07CBDBC8EB80C034000436007E018801016B01FEFFFEFEFEFE0F7F0
D07891FF198F1E9E1F304730C
becomes an identifier.
Look into this for how to use substitution variables
http://www.oracle.com/technology/support/tech/sql_plus/htdocs/sub_var.html
If you don't have time to go through it all, I suggest you at least read section 2.
This won't solve all your problems, but it should explain yur current ORA-00972.
Regards
Peter

Similar Messages

  • Help me to solve this

    I can't view My JSP file I am getting Error Message
    Java Compile not Found
    Unable to Compile the Source file for JSP
    I copied tools.jar to servers lib dir
    But Yet i get the same message
    Pls help me to Solve this Problem

    Most common cause of the problem: JAVA_HOME environment variable not set, or set incorrectly.
    It should point to your java directory: ie C:\java1_4\ NOT C:\java1_4\bin
    Another possible cause is spaces in the path names where you have installed applications.
    Check out this page: http://www.coreservlets.com/Apache-Tomcat-Tutorial/ for a tutorial on installing tomcat.
    If you can't sort it out on your own, we need more info:
    Where have you installed Java?
    Where have installed Tomcat?
    What is the value of JAVA_HOME environment variable?
    Good luck,
    evnafets

  • Help me to solve this assignments...

    1. Write a program to print a triangle multiplication table as shown below:
    0
    0 2
    0 3 6
    0 4 8 12
    0 5 10 15 20
    0 6 12 18 24 30
    0 7 14 21 28 35 42
    2.Write a Java program that will display the factorial of the number 10.
    3.Write a Java Program to display a four by four identity matrix
    4.Write a program to calculate the sum of the odd integers between 1 and 99 using for loop.
    kindly help me to solve this assignment.

    Am I correct in all???
    class Assignment
         public static void main(String args[])
              //This is to print the numbers in triangle
              for(int i = 1; i < 8; i++)
                   for(int j = 0; j < i; j++)
                        System.out.print(" " + i*j);
                   System.out.println("");
              //print value for 10 factorial
              int factorialvalue=1;
              int f=6;
              for(int l=f;l>1;l--)
                   factorialvalue*=l;
              System.out.println("F values is "+factorialvalue);
              //4 x 4 Matrix
              for(int s=0;s<4;s++)
                   for(int m=0;m<4;m++)
                        System.out.print("("+s+","+m+") ");
                   System.out.println("");
              //sum of odd numbers up to 99
              int h=0;
              for (int b=1;b<10;b+=2)
                   h+=b;
              System.out.println("Sum is "+h);
    selva.

  • Can  you help me to solve this problem (user-exit for xd02)

    Hi!
    can  you help me to solve this problem?
    transaction XD02
    To pass the length of the field to 7 max    for    KNA1-SORT   (Search criterion 1 )
    To pass the length of the field to 4  max   for   ADRC-SORT2  (Search criterion 2)
    It is not possible to save  the customer card as long as the search criterion is not univocal
    I seek one to use-exit .
    Thanks.

    Hi,
    Check the exit SAPMF02D.
    Regards,
    Surinder

  • Hello i have a unusual problem,anyway my iphone 4 wont turn on and when someone calls they hear ringing,but my phone doesent ring,so i open cimcas now ring off. Screen is just black,because it's turned off..Please help me to solve this problem..Thanks

    Hello i have a unusual problem,anyway my iphone 4 wont turn on and when  someone calls they hear ringing,but my phone doesent ring.So i poen simcase and now ring off. Screen is just  black,because it's turned off..Please help me to solve this  problem..Thanks

    As far as trying to power up your device, make sure it has a good charge and then hold the button on the top of the phone and the home button on the faceplate together until the apple appears on the screen.

  • Hi, when ever I'm using 3G, on my Iphone4 sim stops working and Network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem.

    Hi, when ever I'm using 3G, on my Iphone4 sim stops working and network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem. Thanks.

    Photos/videos in the Camera Roll are not synced. Photos/videos in the Camera Roll are not touched with the iTunes sync process. Photos/videos in the Camera Roll can be imported by your computer which is not handled by iTunes. Most importing software includes an option to delete the photos/videos from the Camera Roll after the import process is complete. If is my understanding that some Windows import software supports importing photos from the Camera Roll, but not videos. Regardless, the import software should not delete the photos/videos from the Camera Roll unless you set the app to do so.
    Photos/videos in the Camera Roll are included with your iPhone's backup. If you synced your iPhone with iTunes before the videos on the Camera Roll went missing and you haven't synced your iPhone with iTunes since they went missing, you can try restoring the iPhone with iTunes from the iPhone's backup. Don't sync the iPhone with iTunes again and decline the prompt to update the iPhone's backup after selecting Restore.

  • Hello Experts Please help me to solve this problem.

    Hello Experts,
    I am getting a problem while installing the SOLUTION MANAGER 4.0.
    in step 17/45 IMPORT ABAP :
    the problem is :
    ERROR 2008-04-29 03:10:28.110
    CJS-30023  Process call '/usr/sap/SLM/SYS/exe/run/R3load -testconnect' exits with error code 2. For details see log file(s) R3load.exe.log.
    when i saw R3load.exe.log file it has the following contain :
    sapparam: sapargv( argc, argv) has not been called.
    sapparam(1c): No Profile used.
    sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
    /usr/sap/SLM/SYS/exe/run/R3load: START OF LOG: 20080428095833
    /usr/sap/SLM/SYS/exe/run/R3load: sccsid @(#) $Id: //bas/700_REL/src/R3ld/R3load/R3ldmain.c#13 $ SAP
    /usr/sap/SLM/SYS/exe/run/R3load: version R7.00/V1.4 [UNICODE]
    Compiled Jul 14 2007 02:19:03
    /usr/sap/SLM/SYS/exe/run/R3load -testconnect
    DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12505
    DbSl Trace: CONNECT failed with sql error '12505'
    DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12505
    DbSl Trace: CONNECT failed with sql error '12505'
    (DB) ERROR: db_connect rc = 256
    DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12505
    DbSl Trace: CONNECT failed with sql error '12505'
    DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12505
    DbSl Trace: CONNECT failed with sql error '12505'
    (DB) ERROR: DbSlErrorMsg rc = 99
    /usr/sap/SLM/SYS/exe/run/R3load: job finished with 1 error(s)
    /usr/sap/SLM/SYS/exe/run/R3load: END OF LOG: 20080428095834
    Please can any body help me to solve this problem.
    waiting for fast response, as my installtion is pending due to this problem.
    have a nice day.
    Regards,
    Shivendra.

    Hi,
    The following should be verified:
    (1) check what DB instances the listener currently is aware of.  This can be done with the command 'lsnrctl services'.
    (in case you listener does not have the default name LISTENER, then use 'lsnrctl services <listener name>' )
    (2) Perhaps there is an issue with the dynamic instance registration, even though the error code is different, you should nevertheless check the points from note #563574.
    (3) Verfiy the value of the parameter local_listener (see mentioned note). Since you have changed the listener, the parameter might still be wrong.
    In case local_listener is correcly set you should give the command
      ALTER SYSTEM REGISTER;
    a try.
    Best Regards,
    Michael

  • Please help me to solve this date comparision issue..

    Please help me to solve this issue..
    If i have some data like the following..
    ID           START DATE             END DATE
    1             20080101              20080501
    1             20080502              20080630
    2             20080631              20080801
    2             20080802              20080901
                                                 ---------------> There is a break in date over here
    2             20080930              20081029
    2             20081030              20081130
    I need to compare the End Date with the start date (These data will not be in order)
    and find out if there is any break and should get the output date : *20080930*
    I am trying to do this in SQL or PL/SQL.Please help me .
    Thanks in advance.
    phani

    Hi Frank ,
    Sorry to bug you again. I ran your code on my actual data but not gettting the expected output.Here i am posting the actual code and the output that i got when i ran your code.Please bear with me and help me to solve this..
    /* Formatted on 5/25/2009 2:27:24 PM (QP5 v5.115.810.9015) */
    SELECT   member_nbr,
             aff_nbr,
             ymdeff,
             ymdend,
             gap_before,
             COUNT (gap_after)
                OVER (PARTITION BY member_nbr, aff_nbr ORDER BY ymdend DESC)
                AS gap_cnt
      FROM   (SELECT   member_nbr,
                       aff_nbr,
                       ymdeff,
                       ymdend,
                       CASE
                          WHEN ymdeff >
                                  LEAD(ymdend)
                                     OVER (PARTITION BY member_nbr, aff_nbr
                                           ORDER BY ymdend DESC)
                                  + 1
                          THEN
                             1
                       END
                          AS gap_before,
                       CASE
                          WHEN ymdend <
                                  LAG(ymdeff)
                                     OVER (PARTITION BY member_nbr, aff_nbr
                                           ORDER BY ymdend DESC)
                                  - 1
                          THEN
                             1
                       END
                          AS gap_after
    ------------I need this SQL to filter the whole data to the data that i posted in previous post -----
                FROM   (  SELECT   ms1.member_nbr, 
                                   ms1.aff_nbr,
                                   ms1.ymdeff,
                                   ms1.ymdend,
                                   ms1.void
                            FROM   (SELECT   ms.member_nbr,
                                             ms.aff_nbr,
                                             ms.ymdeff,
                                             ms.ymdend,
                                             ms.void
                                      FROM   MEMBER mb, member_span ms
                                     WHERE   mb.member_nbr = ms.member_nbr
                                             AND (20090523 BETWEEN ms.ymdeff
                                                               AND  ms.ymdend
                                                  AND TRIM (void) IS NULL)
                                             AND mb.member_nbr = 'A1000073000 ')
                                   eff_pcp,
                                   member_span ms1
                           WHERE   ms1.member_nbr = eff_pcp.member_nbr
                                   AND (SUBSTR (eff_pcp.aff_nbr, 1, 6) =
                                           SUBSTR (ms1.aff_nbr, 1, 6))
                        ORDER BY   ms1.ymdeff DESC)
    ---------- end of my part  ----------
                table_x) got_gaps;Outputs that i got when i ran that code for each individual members..
    Sorry to bug you frank and thanks for all the help.I will post here if i get any other data.
    Thanks
    phani

  • TS1363 My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue?

    My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue? I have already updated to the latest version of iTunes on my Windows 8 and I cannot synchronize my iPod for the time being. Please do help me to solve this problem. Thank You.

    uninstall all iTunes,5 programes,this worked for me after reinstall them

  • My Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem

    my Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem

    Carlos-
    Start by signing out and back in to see if it will see the subscription: 
    How to sign in and sign out of creative cloud (activate/deactivate)
    If the apps are installed fine and close after launch see this link:
    CC applications close immediately after launch
    If the problem is something different, please let us know the error you see or what is happening on the screen so we can advise  you on a solution
    Pattie

  • Urgent Help required in Tunning this query

    I have table ACCOUNT SPONSOR HOMESTORE ASH with more than 30 million rows.
    My batch daily need to update or insert into this table from a temporary table TEMP_HSTRALCT. The data for temporary table is populated by below query which selects from two tables TRANSACTION POINTS and REDEMPTIONS.However both these tables are partitioned on date time and is run daily and this is running for hours.
    Can anyone please help me on tuning this query
    INSERT INTO temp_hstralct
    (tmp_n_collector_account_num, tmp_v_location_id,
    tmp_v_sponsor_id, tmp_v_source_file_name,
    tmp_n_psc_insert_ind, tmp_n_psc_update_ind,
    tmp_n_transaction_amount, tmp_n_transaction_points,
    tmp_n_acc_insert_ind, tmp_n_ash_insert_ind,
    tmp_n_col_insert_ind, tmp_n_check_digit,
    tmp_n_collector_issue_num, tmp_n_csl_insert_ind,
    tmp_v_offer_code, tmp_n_psa_insert_ind)
    SELECT DISTINCT trp_n_collector_account_num account_num,
    trp_v_location_id location_id,
    trp_v_sponsor_id sponsor_id,
    trp_c_creation_user batch_id, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0
    FROM transaction_points, ACCOUNT, locations_master,homestores
    WHERE hsr_v_accrual_allowed = 'Y'
    AND trp_n_collector_account_num = ACCOUNT.acc_n_account_num(+)
    AND ( ( ( ACCOUNT.acc_v_account_type = 'C'
    OR ACCOUNT.acc_v_account_type IS NULL
    AND hsr_v_b2c_accounts = 'Y'
    OR ( ACCOUNT.acc_v_account_type = 'B'
    AND hsr_v_nfb_accounts = 'Y'
    OR ( ACCOUNT.acc_v_account_type = 'H'
    AND hsr_v_hybrid_accounts = 'Y'
    AND trp_d_creation_date_time BETWEEN SYSDATE-3
    AND SYSDATE
    AND trp_v_sponsor_id = 'JSAINSBURY'
    AND trp_v_location_id =
    locations_master.lnm_v_location_id
    AND locations_master.lnm_v_partner_id = 'JSAINSBURY'
    AND ( ( ( (INSTR
    (hsr_v_store_status,
    locations_master.lnm_c_location_status
    ) > 0
    AND (INSTR
    (hsr_v_store_type,
    locations_master.lnm_c_location_type
    ) > 0
    AND hsr_v_homestore_assignment = 'ST'
    OR ( ( locations_master.lnm_c_homestore_ind =
    'Y'
    AND (INSTR
    (hsr_v_store_status,
    locations_master.lnm_c_location_status
    ) > 0
    AND hsr_v_homestore_assignment = 'HS'
    UNION ALL
    SELECT DISTINCT rdm_n_collector_account_num account_num,
    rdm_v_location_id location_id,
    rom_v_supplier_id sponsor_id,
    rdm_c_creation_user batch_id, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0
    FROM redemption_details,
    reward_offer_master,
    ACCOUNT,
    locations_master,
    HOMESTORES
    WHERE hsr_v_redemption_allowed = 'Y'
    AND rdm_n_collector_account_num = ACCOUNT.acc_n_account_num(+)
    AND ( ( ( ACCOUNT.acc_v_account_type = 'C'
    OR ACCOUNT.acc_v_account_type IS NULL
    AND hsr_v_b2c_accounts = 'Y'
    OR ( ACCOUNT.acc_v_account_type = 'B'
    AND hsr_v_nfb_accounts = 'Y'
    OR ( ACCOUNT.acc_v_account_type = 'H'
    AND hsr_v_hybrid_accounts = 'Y'
    AND rdm_d_creation_date_time BETWEEN SYSDATE-3
    AND SYSDATE
    AND rom_v_reward_offer_id = rdm_v_reward_id
    AND rom_v_supplier_id = 'JSAINSBURY'
    AND rdm_v_location_id =
    locations_master.lnm_v_location_id
    AND locations_master.lnm_v_partner_id ='JSAINSBURY'
    AND ( ( ( (INSTR
    (hsr_v_store_status,
    locations_master.lnm_c_location_status
    ) > 0
    AND (INSTR
    (hsr_v_store_type,
    locations_master.lnm_c_location_type
    ) > 0
    AND hsr_v_homestore_assignment = 'ST'
    OR ( ( locations_master.lnm_c_homestore_ind =
    'Y'
    AND (INSTR
    (hsr_v_store_status,
    locations_master.lnm_c_location_status
    ) > 0
    AND hsr_v_homestore_assignment = 'HS'
    );

    I have copied the explain as it is and can you please try pasting in the text pad.Can you let me know whether parallel hint on this will speed up the select queries.
              Plan
              INSERT STATEMENT CHOOSECost: 410,815 Bytes: 2,798,394 Cardinality: 15,395                                                        
                   32 UNION-ALL                                                   
                        15 SORT UNIQUE Cost: 177,626 Bytes: 2,105,592 Cardinality: 11,896                                              
                             14 FILTER                                         
                                  13 HASH JOIN Cost: 177,312 Bytes: 2,105,592 Cardinality: 11,896                                    
                                       2 TABLE ACCESS BY INDEX ROWID LMHOLTP.LOCATIONS_MASTER Cost: 37 Bytes: 23,184 Cardinality: 966                               
                                            1 INDEX RANGE SCAN NON-UNIQUE LMHOLTP.IX_LOCATIONS_MASTER_3 Cost: 3 Cardinality: 1                          
                                       12 FILTER                               
                                            11 HASH JOIN OUTER                          
                                                 8 MERGE JOIN CARTESIAN Cost: 155,948 Bytes: 702,656,660 Cardinality: 4,845,908                     
                                                      3 TABLE ACCESS FULL LMHOLTP.HOMESTORES Cost: 2 Bytes: 104 Cardinality: 1                
                                                      7 BUFFER SORT Cost: 155,946 Bytes: 198,682,228 Cardinality: 4,845,908                
                                                           6 PARTITION RANGE ITERATOR Partition #: 12           
                                                                5 TABLE ACCESS BY LOCAL INDEX ROWID LMHOLTP.TRANSACTION_POINTS Cost: 155,946 Bytes: 198,682,228 Cardinality: 4,845,908 Partition #: 12      
                                                                     4 INDEX RANGE SCAN NON-UNIQUE LMHOLTP.IX_TRANSACTION_POINTS_1 Cost: 24,880 Cardinality: 6,978,108 Partition #: 12
                                                 10 PARTITION RANGE ALL Partition #: 15 Partitions accessed #1 - #5                    
                                                      9 TABLE ACCESS FULL LMHOLTP.ACCOUNT Cost: 6,928 Bytes: 68,495,680 Cardinality: 8,561,960 Partition #: 15 Partitions accessed #1 - #5               
                        31 SORT UNIQUE Cost: 233,189 Bytes: 692,802 Cardinality: 3,499                                              
                             30 FILTER                                         
                                  29 FILTER                                    
                                       28 NESTED LOOPS OUTER                               
                                            24 HASH JOIN Cost: 226,088 Bytes: 664,810 Cardinality: 3,499                          
                                                 16 TABLE ACCESS FULL LMHOLTP.REWARD_OFFER_MASTER Cost: 8 Bytes: 2,280 Cardinality: 114                     
                                                 23 HASH JOIN Cost: 226,079 Bytes: 8,327,280 Cardinality: 48,984                     
                                                      20 TABLE ACCESS BY INDEX ROWID LMHOLTP.LOCATIONS_MASTER Cost: 37 Bytes: 432 Cardinality: 18                
                                                           19 NESTED LOOPS Cost: 39 Bytes: 2,304 Cardinality: 18           
                                                                17 TABLE ACCESS FULL LMHOLTP.HOMESTORES Cost: 2 Bytes: 104 Cardinality: 1      
                                                                18 INDEX RANGE SCAN NON-UNIQUE LMHOLTP.IX_LOCATIONS_MASTER_3 Cost: 3 Cardinality: 966      
                                                      22 PARTITION RANGE ITERATOR Partition #: 28                
                                                           21 TABLE ACCESS FULL LMHOLTP.REDEMPTION_DETAILS Cost: 226,019 Bytes: 261,636,270 Cardinality: 6,229,435 Partition #: 28           
                                            27 PARTITION RANGE ITERATOR Partition #: 30                          
                                                 26 TABLE ACCESS BY LOCAL INDEX ROWID LMHOLTP.ACCOUNT Cost: 2 Bytes: 8 Cardinality: 1 Partition #: 30                     
                                                      25 INDEX UNIQUE SCAN UNIQUE LMHOLTP.CO_PK_ACCOUNT Cost: 1 Cardinality: 1 Partition #: 30

  • Please help to re-write this query using exists or with

    Hi please help to re-write this query using exists or with, i need to write same code for 45 day , 90 days and so on but sub query condition is same for all
    SELECT SUM (DECODE (t_one_mon_c_paid_us, 0, 0, 1)) t_two_y_m_mul_ca_
    FROM (SELECT SUM (one_mon_c_paid_us) t_one_mon_c_paid_us
    FROM (
    SELECT a.individual_id individual_id,
    CASE
    WHEN NVL
    (b.ship_dt,
    TO_DATE ('05-MAY-1955')
    ) >= SYSDATE - 45
    AND a.country_cd = 'US'
    AND b.individual_id in (
    SELECT UNIQUE c.individual_id
    FROM order c
    WHERE c.prod_cd = 'A'
    AND NVL (c.last_payment_dt,
    TO_DATE ('05-MAY-1955')
    ) >= SYSDATE - 745)
    THEN 1
    ELSE 0
    END AS one_mon_c_paid_us
    FROM items b, addr a, product d
    WHERE b.prod_id = d.prod_id
    AND d.affinity_1_cd = 'ADH'
    AND b.individual_id = a.individual_id)
    GROUP BY individual_id)
    Edited by: user4522368 on Aug 23, 2010 9:11 AM

    Please try and place \ before and after you code \Could you not remove the inline column select with the following?
    SELECT a.individual_id individual_id
         ,CASE
            when b.Ship_dt is null then
              3
            WHEN b.ship_dt >= SYSDATE - 90
              3
            WHEN b.ship_dt >= SYSDATE - 45
              2
            WHEN b.ship_dt >= SYSDATE - 30
              1
          END AS one_mon_c_paid_us
    FROM  items           b
         ,addr            a
         ,product         d
         ,order           o
    WHERE b.prod_id       = d.prod_id
    AND   d.affinity_1_cd = 'ADH'
    AND   b.individual_id = a.individual_id
    AND   b.Individual_ID = o.Individual_ID
    and   o.Prod_CD       = 'A'             
    and   NVL (o.last_payment_dt,TO_DATE ('05-MAY-1955') ) >= SYSDATE - 745
    and   a.Country_CD    = 'US'

  • ýesterday  my iphone 5c screen  suddendly  shows connect to itune and i try to restore it using itune but halfway i got a message error occured (14). please help me in solving this problem.

    ýesterday  my iphone 5c screen  suddendly  shows connect to itune and i try to restore it using itune but halfway i got a message error occured (14). please help me in solving this problem.

    what did you learn when you search the internet for iPhone error 14?

  • Hello Sorry for the inconvenience, but I have a problem in Java I can not open files, audio chat, which type of jnlp after the last update of the Java 2012-004 Please help me in solving this problem.

    Hello Sorry for the inconvenience, but I have a problem in Java I can not open files, audio chat, which type of jnlp after the last update of the Java 2012-004
    Please help me in solving this problem. 

    Make sure Java is enable in your browser's security settings.
    Open Java Preferences (in Utilities folder)
    Make sure Web-start applications are enabled.
    Drag Java 32-bit to the top of the list.
    jnlp isn't an audio file format. It's just a java web-start program (Java Network Launching Protocol).

  • We have 'CS6' version of Adobe. We are facing a problem with 'Acrobat Pro'. Every month that is stop working and everytime need to install. Kindly help us regarding solving this problem...

    We have 'CS6' version of Adobe. We are facing a problem with 'Acrobat Pro'. Every month that is stop working and everytime need to install. Kindly help us regarding solving this problem...

    Your Acrobat is running in Trial Mode.  Try this KB: Creative Cloud applications unexpectedly revert to trial mode | CS6, CCM
    If it doesn't work you need to contact Adobe Support for assistance.

Maybe you are looking for

  • IM FED UP WITH ITUNES... I NEED HELP (DOWNLOADING 7.6)

    I've tried to download the newest version of itunes 7.6 on my DELL windows XP computer at least 50 times. It takes me strait to the thank you page without downloading anything. I've tried multiple ways of trying to downloading this, considering I jus

  • Does my MacBook support HD output?

    I am considering buying this monitor - http://accessories.us.dell.com/sna/products/Displays/productdetail.aspx?c=us&l=e n&s=dhs&cs=19&sku=320-7438 I have a MacBook 4,1 which has a mini DVI port for output? As you may notice from the link, this monito

  • Help - I'm a newbie to Mac

    I don't know Mac or Unix, but I am in the process of setting up a Xserve for handling e-amil. What should I do about spam? The GUI is doing nothing to block spam. I downloaded and installed spamtrainer...but I don't know how to configure it. I also n

  • Store Very Large Numbers

    Hello, I am trying to find some info about how to store very large numbers with like 2000 digits or even more and do calculations on them. Does anyone have any info or links about this ?? Thanks.

  • Bug in IE using scaleMode

    Whenever I set the scalemode to no scale it messes up the position and covers half the clips in IE. Any ideas?