Pls help me for tuning the querry

Hi Team,
Can any one help me to tune the query below.
The table STG_INT_CASHFLOWS has 20 lahks record with index created for PAYMENTDATE,DEALNUMBER,PAYRECEIVEIND.
Is there any other way like collecting into array and finding the values etc..
SELECT '1'
FROM STG_INT_CASHFLOWS
WHERE PAYMENTDATE < :B4
AND PAYMENTDATE > TO_CHAR (:B3, 'YYYYMMDD')
AND DEALNUMBER = :B2
AND PAYRECEIVEIND = :B1
AND ROWNUM = 1
Thanks.

Logic of my code below.
For test in(
select * from STG_INT_CASHFLOWS ORDER BY dealnumber, payreceiveind, TO_DATE (TRIM (paymentdate), 'yyyymmdd')) Loop
SELECT 0 into Varibale
FROM STG_INT_CASHFLOWS
WHERE PAYMENTDATE < test.PAYMENTDATE
AND PAYMENTDATE > TO_CHAR (sysdate, 'YYYYMMDD')
AND DEALNUMBER = test.dealnumber
AND PAYRECEIVEIND = test.PAYRECEIVEIND
AND ROWNUM = 1
We have some other logice below and select statement used using the cursor values.
End loop;
But we face only performace issue with the main cursor with order by clause. But as per logic order by clause cannot be removed. we will use th select staement mentioned.

Similar Messages

  • Hi, i installed ios 5 for my iphone 4 and the camera function on lock screen was on the first few days , now it doesn't show the lock screen . is there any change i can do . Pls help me to solve the issue.

    hi, i installed ios 5 for my iphone 4 and the camera function on lock screen was on the first few days , now it doesn't show the lock screen . is there any change i can do . Pls help me to solve the issue.

    nishaadp wrote:
    ... it stucks with the apple logo ,  nothing works. Is anything i can do?
    See Here for
    Frozen or unresponsive iPhone

  • When i got my new iphone 4, its in recovery mode. while restroing with itunes, im getting error at restoring firmware stage? what could be the reason? pls help me for solution.

    when i got my new iphone 4, its in recovery mode. while restroing with itunes, im getting error at restoring firmware stage? what could be the reason? pls help me for solution.

    You got a new iPhone 4, and out of the box the phone is in recovery mode? If that's the case, return it.
    If you don't want to do that. what error code are you getting?

  • Hi ...Some days ago i bought a used iphone 4s....but i can't activate the phone...when i connect it to itunes it shown that activate the phone but the person was not give me the ID & password....pls help me for this issue....Iphone is my favourite ph

    Hi ...Some days ago i bought a used iphone 4s....but i can't activate the phone...when i connect it to itunes it shown that activate the phone but the person was not give me the ID & password....pls help me for this issue....Iphone is my favourite phone...in my child hood i love Apple products & till now......I can't activate it & for this reason i can't find the carrier network & can't make any call....pls help me...thanks for always support..My device ios is 7.1.2
    & IMEI is : *****
    Br-----------------------
    Fazlur
    <Personal Information Edited By Host>

    It's a security risk to post your IMEI number and I've asked the Hosts to remove it.
    If a second-hand iOS device has been 'Activation locked' then only the previous owner can unlock it, either by providing you with the account ID and password, or by removing it from his list of devices (as he should have done before selling it) - please see http://support.apple.com/kb/ts4515
    If you are unable to contact him to do this then I'm afraid you will not be able to use the device - there is no other way of unlocking it at all. Apple cannot unlock it for you.
    You should if possible return it to wherever you bought it and ask for a refund as in this event the device is completely useless.

  • Hi there, pls help since I upgraded the software to ios7 i have no more facetime neither in my contacts nor in settings... so i cannot activate it. anyone knows why this happened and how to fix it?thankso

    Hi there, pls help since I upgraded the software to ios7 i have no more facetime neither in my contacts nor in settings... so i cannot activate it. anyone knows why this happened and how to fix it?thanks

    Tap and hold the Home button and the On/Off buttons for approximately 10-15 seconds, until the Apple logo reappears. When the logo appears, release both buttons.
    No content is affected by this procedure.

  • USELESS ONLINE HELP FACILITIES For all the amazing productivity aids that APPLE offers the world I have to report that their online support service is worse than useless and has recently been the source of immense time wasting and irritation.

    USELESS ONLINE HELP FACILITIES
    For all the amazing productivity aids that APPLE offers the world I have to report that their online support service is worse than useless and has recently been the source of immense time wasting and irritation.
    Incident 1. Since many months attempts to download new and updated APPs produced a response – Apple ID Disabled. I had no time to consult an APPLE Store due to work in distant lands. When I finally visited yesterday I was told that as my IPAD has been reported as stolen, and APPLE in its wisdom had blocked its usage! I am not sure how they became so misinformed and nobody every advised me while with a few swift moves APPLE could have located me by email address or SKYPE.
    Incident 2. Once the above anomaly had been fixed I tried to down load a newspaper and diligently input my address, credit card number and personal data. Repeatedly I was advised that my Credit Card was invalid and my postal code was incorrect! Really!
    I was left to guess that having moved from UK to the US I should have advised APPLE! Not being told of this requirement brought about a second visit to APPLE Store in the same day to waste both mine and their time with a routine anomaly. How parochial in the context of a globalized world!
    In each case I tried to resolve the issues using online access to a help line and by calling by phone at the numbers on the APPLE Website. In each of four separate occasions I diligently went through the routine and  ended up with a message that thanked me for contacting Apple followed by a polite ‘Good Bye’!
    In desperation I went to an Apple Store for the second time in a day as it is close to where I live when I am not working. On both occasions I was courteously attended to by Apple Staff.
    However, my work is usually far away from the US and it is generally many thousands of miles to the nearest Apple Store therefore online help is viewed as imperative if one is to resolve issues away from home.
    Why can Apple not provide a clearly marked EMAIL address and Telephone number at a Help Desk with real people to respond to requests for help? It would cost nothing in relative terms and might restore my high level of anti-APPLE sentiment that these two recent events have provoked.
    Peter Hanney
    Miami, Fl.

    Why can Apple not provide a clearly marked EMAIL address and Telephone number at a Help Desk with real people to respond to requests for help?
    If that is your question, the answer is at the bottom right of this web page. It is clearly marked "Contact Us" and is the best way, really the only way, to contact Apple.
    If there were a publicly posted email address for concerns such as yours, it would be quickly filled with spam in about three minutes, thereby becoming instantly useless to you and everyone else. Apple would need to change it hourly, if not more often. That is also the reason you ought not to post your name, location, and what appears to be your iPad's serial number on this publicly viewable website.
    Apple does not respond here and I can find no other questions for your fellow Apple users to answer.

  • Dear Friends, I am trying to draw a structure in Adobe Illustrator with 3D effect. But I am unable to give it proper shape. Can someone please help me for drawing the similar structure as showed below. I have facing problems in giving 3D effect.

    Dear Friends, I am trying to draw a structure in Adobe Illustrator with 3D effect. But I am unable to give it proper shape. Can someone please help me for drawing the similar structure as showed below. I have facing problems in giving 3D effect.
    Thanks a lot for your great help...

    i made a quick example:
    and what it's made of:
    just shapes and gradients. used a combination of pathfinder and shape builder to get the shapes exact.

  • Help me for writing the password script on solaris

    hi,
    help me for writing password scripts to change the user/root password.
    in the script itself myself want to mention the new password.
    now user want to login with the new password only.
    model script:
    echo $test:`perl -e '$x=crypt('$test123','test');
                   print $x'`::::::: >> /etc/shadow
    test--->username
    test123---->new password.
    the above script is not working.
    kindly help me for writing the script.
    Regards,
    raja

    Well. For one thing, if you just append the new password to the /etc/shadow file there will be two entries for the user in that file (at least if the user already had a password). Which probably is a bad thing.

  • Pls help me to find the smartform name for RMA REQUEST(RMA)

    Hi Experts,
    Pls Tell me how too find the smartform name for RMA REQUEST(RMA)
    Pls help
    Thanks and regards
    Jaya

    WHat is RMA REQUEST form please ellobrate your query
    the smrat form tcode is SMARTFORMS.....you can try

  • Pls help me to modify the query for performance improvement

    Hi,
    I have the below initialization
    DECLARE @Active bit =1 ;
    Declare @id int
    SELECT @Active=CASE WHEN id=@id and [Rank] ='Good' then 0 else 1 END  FROM dbo.Students
    I have to change this query in such a way that the conditions id=@id and [Rank] ='Good' should go to the where condition of the query. In that case, how can i use Case statement to retrieve 1 or 0? Can you please help me to modify this initialization?

    I dont understand your query...May be below? or provide us sample data and your output...
    SELECT *  FROM dbo.students
    where @Active=CASE
    WHEN id=@id and rank ='Good' then 0 else 1 END
    But, I doubt you will have performance improvement here?
    Do you have index on id?
    If you are looking for getting the data for @ID with rank ='Good' then use the below:Make sure, you have index on id,rank combination.
    SELECT *  FROM dbo.students
    where  id=@id
    and rank ='Good' 

  • Pls help   how to check the condition in java server faces.....???

    Hi All
    I have strucked with code pls help....
    How can i check the codition in java server faces.....?
    like in my Application when user provides the in put like some state name in the next page i have to display some url for that state .......if he provide some other state name it will be different url .....pls help me how can i do that,,,,,,???
    thanks in advance..

    There are certainly ways to do that. E.g. using the rendered attribute, using conditional statements in EL, using a specialized getter for that (lazily loaded if necessary), etcetera. But your functional requirement is unclear, so I can't go in detail with that.
    In the future, please try to write normal English sentences. Don't write like SMS talk and save the periods and commas. The more effort you put in your question, the more chance you will be taken for serious and the more effort others will post in their answers.
    Also, in the future, JSF related questions should be posted in the JSF forum.
    Edited by: BalusC on 12-aug-2008 7:47

  • Back up problem. Pls help me to solve the problem.

    Dear Apple support team,
    When I connect ipod to Itunes, the process of verifying and backing up is too long. And Itunes makes all programs such as firefox, yahoo messenger... run slowly. After syncing, the notice is appeared as below:
    Therefor, I do not know whether the Itunes create backup or not
    Pls help to check and solve this problem.
    Thanks for your support
    Lolly

    I can't give you the adequate support, but maybe the iTunes forume can: https://discussions.apple.com/community/itunes/itunes_for_windows / https://discussions.apple.com/community/itunes/itunes_for_mac

  • Pls help me in debugging the emial procedure

    Hi;
    I am trying to compike this procedure for sending a mail but am unable to rectify the errors..can u ppl pls help me?
    DECLARE
    m_body CLOB;
    mas_id number;
    mcust_id number;
    mcustomer_name varchar2(100);
    mproduct varchar2(15);
    minstance varchar2(10);
    mtoa varchar2(10);
    mton number;
    mpriority number;
    massesor1 varchar2(15);
    massesor2 varchar2(15);
    mreviewer1 varchar2(15);
    mreviewer2 varchar2(15);
    mDoa date;
    mstartdate date;
    mreviewdate date;
    mfinaldate date;
    mactualdate date;
    mssc varchar2(10);
    mpanno number;
    mtime varchar2(10);
    mcustinterview varchar2(10);
    minterviewdate date;
    mdev_by varchar2(100);
    mcust-feedback varchar2(4000);
    mSr_no number;
    mgar_id number;
    mpoc varchar2(30);
    BEGIN
    select ASSESMENT_ID, CUSTOMER_ID, CUSTOMER, PRODUCT, INSTANCE, TOA, TON, REL_PRIORITY, ASSESOR1, ASSESOR2, REVIEWER1, REVIEWER2, DOA, START_DATE, REVIEW_DUE_DATE, FINAL_DUE_DATE, ACTUAL_DEL_DATE, SSC , PA_NO, TIME_ENTRY, CUST_INTVW , INTVW_DATE , DEV_BY_ENG , CUST_FB , SR_NO , GAR_ID , POC from assesment into
    mas_id,mcust_id, mcustomer_name, mproduct,minstance, mtoa,mton, mpriority, massesor1,massesor2, mreviewer1, mreviewer2, mDoa,mstartdate, mreviewdate, mfinaldate, mactualdate, mssc, mpanno, mtime,mcustinterview, minterviewdate, mdev_by, mcust-feedback,mSr_no, mgar_id, mpoc, from ASSESMENT where
    CUSTOMER= :P17_CUSTOMER_ID;
    m_body := m_body || ' ' || mas_id || ' ' || mcust_id || ' ' || mcustomer_name || ' ' || mproduct || ' ' || minstance || ' ' || mtoa || ' ' || mton || ' ' || mpriority ||' ' || massesor1 || ' ' || massesor2 ||' ' || mreviewer1 || ' ' || mreviewer2 ||' ' || mDoa || ' ' || mstartdate || ' ' || mreviewdate || ' ' || mfinaldate ||' ' || mactualdate || ' ' || mssc ||' ' || mpanno || ' ' || mtime ||' ' || mcustinterview || ' ' || minterviewdate || ' ' || mdev_by || ' ' || mcust-feedback ||' ' || mSr_no || ' ' || mgar_id ||' ' || mpoc || utl_tcp.crlf ||utl_tcp.crlf;
    apex_mail.send( p_to => :P17_TO_ID,
    p_from => :P17_FROM_ID ,
    p_body => m_body, p_subj => 'Test mail');
    APEX_MAIL.PUSH_QUEUE;
    END;
    Thanks in advance
    Samiya
    Edited by: user10763992 on Jun 19, 2009 12:15 AM

    Rephrase the select statment;
    From:
    select ASSESMENT_ID, CUSTOMER_ID, CUSTOMER, PRODUCT, INSTANCE, TOA, TON, REL_PRIORITY, ASSESOR1, ASSESOR2, REVIEWER1, REVIEWER2, DOA, START_DATE, REVIEW_DUE_DATE, FINAL_DUE_DATE, ACTUAL_DEL_DATE, SSC , PA_NO, TIME_ENTRY, CUST_INTVW , INTVW_DATE , DEV_BY_ENG , CUST_FB , SR_NO , GAR_ID , POC from assesment into
    mas_id,mcust_id, mcustomer_name, mproduct,minstance, mtoa,mton, mpriority, massesor1,massesor2, mreviewer1, mreviewer2, mDoa,mstartdate, mreviewdate, mfinaldate, mactualdate, mssc, mpanno, mtime,mcustinterview, minterviewdate, mdev_by, mcust-feedback,mSr_no, mgar_id, mpoc, from ASSESMENT where
    CUSTOMER= :P17_CUSTOMER_ID;
    To:
    select ASSESMENT_ID, CUSTOMER_ID, CUSTOMER, PRODUCT, INSTANCE, TOA, TON, REL_PRIORITY, ASSESOR1, ASSESOR2, REVIEWER1, REVIEWER2, DOA, START_DATE, REVIEW_DUE_DATE, FINAL_DUE_DATE, ACTUAL_DEL_DATE, SSC , PA_NO, TIME_ENTRY, CUST_INTVW , INTVW_DATE , DEV_BY_ENG , CUST_FB , SR_NO , GAR_ID , POC into mas_id,mcust_id, mcustomer_name, mproduct,minstance, mtoa,mton, mpriority, massesor1,massesor2, mreviewer1, mreviewer2, mDoa,mstartdate, mreviewdate, mfinaldate, mactualdate, mssc, mpanno, mtime,mcustinterview, minterviewdate, mdev_by, mcust-feedback,mSr_no, mgar_id, mpoc from ASSESMENT where CUSTOMER= :P17_CUSTOMER_ID;
    Regards,
    Anasuya

  • Pls help me to check the imp par file sytax

    hi, buddy:
    here is a imp par file for a 8i database:
    FROMUSER=(B)
    TOUSER=(B)
    FILE=${TMP_FS}/XXX_imp
    BUFFER=400000000
    LOG=XXXXXXX
    TABLES=(A.table1, A.table2.......)
    IGNORE=N
    COMMIT=Y
    I import selected tables from schema A, and all objects from B.
    is that OK, just double make sure. pls help have a check
    thanks a lot
    Jerry

    Doing a table level import will not import anything other than the tables listed (including database objects like views, packages, etc).
    If you want to import all object from schema B into schema B on the target db, and only selected tables from schema A in the source DB, into schema A then you are going to need to do this in 2 steps. First do the import fromuser=B touser=B. Then do the import again with fromuser=A touser=B tables=a.table1, a.table2...

  • I recently bought a mac book pro sept 2011 and i don't know how to reset my ichat pls help am new to the mac n i feel lost

    i recently bought my mac book pro this month and iam stuck with ichat i want to reset it and i dont know how to
    pls help me am new to mac

    HI,
    Welcome to the    Support Communities
    It really depends on what you have done so far.
    The Simplest is to open iChat go the word iChat in the Menu Bar (Drop Down Menu)
    Select Preferences.
    In there select Accounts.
    Highlight any account in the list you no longer want (you can't delete the Bonjour one)
    Once highlighted press the minus button at the bottom of the list.
    6:24 PM      Monday; September 26, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

Maybe you are looking for

  • HT204053 can you have 2 apple ids under one account

    Our family has several apple devices.  Our phones and computers use icloud to coordinate calendars.  However we do not want to receive each others imessages and such.  With several iphones on imessage and icloud and under the same id this has recentl

  • What is a good template engine?

    I want your suggestions on good template engine. My project is almost done and ready to go to production in few weeks, I want something which is easy to learn yet good enough. Following are my specific requirements: 1) We have like 150 jsps (not too

  • Leopard Terminal - No ANSI Colors at all?

    I've done a lot of searching on Terminal colors in Leopard (updated to latest.) I keep coming across fixes to change your colors, but my issue is that my Terminal doesn't display any ANSI colors at all. The terminal configuration works fine, but colo

  • Distributed Image Filtering

    Hi, I needed some subject for my project at the University and I thougt that "Distributed Image Processing" would be something easy for a project in distributed systems. I wanted to have some image on the server, cut it into smaller pieces and send i

  • How to connect Gigaworks S750 with AUDIGY 2 ZS

    Hello, I'm a french user so please apologize for my bad english ;-) Well, let's talk about the problem. I've bought a GIGAWORKS S750 (occasion) and AUDIGY 2ZS. I tried to connect them but i'm having problem. Let me explain : The cable used to connect