Can someone please tell me what I missed and the mistakes I made in package

The following package compiled alright but did not execute because it is hung up with my ref cursor. Please help.
CREATE OR REPLACE PACKAGE BLU_Providers IS
NAME: BLU_Providers
PURPOSE:
REVISIONS:
Ver Date Author Description
1.0 3/16/2005 1. Created this package.
     TYPE rcRetProviderInfo IS REF CURSOR;
          PROCEDURE GetProviderList
                         (                              pi_maxResults                                                       IN                                                   smallint := 600,
                                                            pi_providerLName                                        IN                                                       varchar2,
                                                            pi_providerCity                                             IN                                                       varchar2,
                                                            pi_providerState                                        IN                                                       varchar2,
                                                            pi_SpecialtyCde                                             IN                                                       varchar2,
                                                            pi_prvNetwork                                                       IN                                                       varchar2,
                                                            pi_prvTaxID                                                                 IN                                                       varchar2,
                                                            po_out_status                                                       OUT                                                  NUMBER,
                                                            po_out_message                                                  OUT                                                  varchar2,
                                                            po_prov_list                                                            OUT                                                  BLU_Providers.rcRetProviderInfo);
END BLU_Providers;
CREATE OR REPLACE PACKAGE BODY BLU_Providers AS
NAME: BLU_Providers
PURPOSE:
REVISIONS:
Ver Date Author Description
1.0 3/16/2005 1. Created this package body.
                         PROCEDURE GetProviderList
                         (                              pi_maxResults                                                       IN                                                   smallint := 600,
                                                            pi_providerLName                                        IN                                                       varchar2,
                                                            pi_providerCity                                             IN                                                       varchar2,
                                                            pi_providerState                                        IN                                                       varchar2,
                                                            pi_SpecialtyCde                                             IN                                                       varchar2,
                                                            pi_prvNetwork                                                       IN                                                       varchar2,
                                                            pi_prvTaxID                                                                 IN                                                       varchar2,
                                                            po_out_status                                                       OUT                                                  NUMBER,
                                                            po_out_message                                                  OUT                                                  varchar2,
                                                            po_prov_list     OUT BLU_Providers.rcRetProviderInfo)
                         IS
                         vsql VARCHAR2(2000);
                         vYes VARCHAR2(1);
                         NAME: GetProviderList --rcRetProviderInfo.cursorType)
                         PURPOSE:
                         REVISIONS:
                         Ver Date Author Description
                         1.0 3/16/2005 1. Created this procedure.
                         NOTES:
                         Automatically available Auto Replace Keywords:
                         Object Name: GetProviderList
                         Sysdate: 3/16/2005
                         Date and Time: 3/16/2005, 1:27:05 PM, and 3/16/2005 1:27:05 PM
                         Username: (set in TOAD Options, Procedure Editor)
                         Table Name: (set in the "New PL/SQL Object" dialog)
                         BEGIN
                                        vYes := 'Y';
                         vsql := 'SELECT
                                                                           (SELECT count(*)
                                                                                FROM
                                                                                                                   doris.PROV_MASTER PM,
                                                                                                                   doris.PROV_SPECIALTY PS,
                                                                                                                   doris.PROV_ADDRESS PA
                                                                                WHERE
                                                                                                              PS.SEQ_PROV_ID = PM.SEQ_PROV_ID AND
                                                                                                              PM.SEQ_PROV_ID(+) = PA.SEQ_PROV_ID AND
                                                                                                              PA.PRIMARY_ADDRESS = vYes) AS numProviders,               
                                                                           PM.PROVIDER_ID,
                                                                           PM.LAST_NAME || '' '' || PM.FIRST_NAME AS ProviderName,
                                                                           PS.SPECIALTY_TYPE AS SpecialtyCde,
                                                                           (                                                                                SELECT
                                                                                                                                                                                                   DESCRIPTION
                                                                                                                                                                FROM           
                                                                                                                                                                                                   doris.PROV_TYPE_MASTER PTM
                                                                                                                                                                WHERE
                                                                                                                                                                                              PS.SPECIALTY_TYPE = PTM.TYPE_OR_SPEC_CODE) AS Specialty,
                                                                           PA.SITE_CODE AS prvLocNum,                                                                                                                   
                                                                           PA.ADDRESS_LINE_1,
                                                                           PA.ADDRESS_LINE_2,
                                                                           PA.CITY,
                                                                           PA.STATE,
                                                                           PA.ZIP_CODE,
                                                                           PA.INACTIVE_IND
                                             FROM
                                                                      doris.PROV_MASTER PM,
                                                                      doris.PROV_SPECIALTY PS,
                                                                      doris.PROV_ADDRESS PA,
                                                  doris.PROV_CONTRACT PC
                                             WHERE
                                                                           PS.SEQ_PROV_ID = PM.SEQ_PROV_ID AND
                                                                           PM.SEQ_PROV_ID(+) = PA.SEQ_PROV_ID AND
                                                                           PM.SEQ_PROV_ID = PC.SEQ_PROV_ID AND ';
                                                  -- If there is no null field in the provider last name          
                                                  if (pi_providerLName IS NOT NULL) THEN
                                                                 vsql:=vsql || 'UPPER(PM.LAST_NAME) like ' || '''' || UPPER(pi_providerLName) || '%' || '''' || ' AND ';
                                        END IF;     -- If there is no null field in the provider last name                    
                                                  -- If there is no null field in the provider City     
                                                  if (pi_providerLName IS NOT NULL) THEN
                                                                 vsql:=vsql || 'UPPER(PA.CITY) like ' || '''' || UPPER(pi_providerCity) || '%' || '''' || ' AND ';
                                        END IF;     -- If there is no null field in the provider City
                                                  -- If there is no null field in the provider state          
                                                  if (pi_providerLName IS NOT NULL) THEN
                                                                 vsql:=vsql || 'UPPER(PA.STATE) like ' || '''' || UPPER(pi_providerState) || '%' || '''' || ' AND ';
                                        END IF;     -- If there is no null field in the provider state
                                                  -- If there is no null field in the provider Specialty Code          
                                                  if (pi_providerLName IS NOT NULL) THEN
                                                                 vsql:=vsql || 'UPPER(PS.SPECIALTY_TYPE) like ' || '''' || UPPER(pi_SpecialtyCde) || '%' || '''' || ' AND ';
                                        END IF;     -- If there is no null field in the provider Specialty Code          
                                                  -- If there is no null field in the provider Network or LOB          
                                                  if (pi_providerLName IS NOT NULL) THEN
                                                                 vsql:=vsql || 'UPPER(PM.LAST_NAME) like ' || '''' || UPPER(pi_providerLName) || '%' || '''' || ' AND ';
                                        END IF;     -- If there is no null field in the provider Network or LOB     
                                                  -- If there is no null field in the provider Tax ID          
                                                  if (pi_providerLName IS NOT NULL) THEN
                                                                 vsql:=vsql || 'UPPER(PC.TAX_ID) like ' || '''' || UPPER(pi_prvTaxID) || '%' || '''' || ' AND ';
                                        END IF;     -- If there is no null field in the provider Tax ID                         
                                                  --Finish the query
                                                  vsql:=vsql || 'PA.PRIMARY_ADDRESS = ' || '''' || vYes || '''' || ' AND ROWNUM <= ' || pi_maxResults || ' ';
                                                  --Pass all the dynamic sql above to the ref cursor
                                                  OPEN po_prov_list FOR vsql;
                                             po_out_status := 0;
                                             po_out_message := 'Got Provider Data';
                         EXCEPTION
                         WHEN OTHERS THEN
                                                  po_out_status := SQLCODE;
                                                                           po_out_message := SUBSTR(SQLERRM,1,100);
                         END GetProviderList;
END BLU_Providers;

Did you get a particular error when you ran the stored procedure?
As an aside, I would generall do this in static SQL via something like
SELECT *
  FROM <<table name>>
WHERE (parameter_1 IS NULL OR
        UPPER(column_1) LIKE UPPER(parameter_1))
   AND (parameter_2 IS NULL OR
        UPPER(column_2) LIKE UPPER(parameter_2))If you have not already created function-based indexes on UPPER(column_1), UPPER(column_2), etc. that would probably be a performance benefit.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • Can someone please tell me what's wrong with the Inside of my iPad Charger? *Picture Included

    It won't charge my iPad. So I wanted to take a good look inside and see what's wrong with it. But I don't know anything about these wires. Here's the Pic of it.
    http://oi39.tinypic.com/2ed5yl2.jpg
    http://oi42.tinypic.com/5btptt.jpg
    http://oi39.tinypic.com/ih8rq1.jpg
    PLEASE HELP. It would be a Big Help

    That's unfortunate, because it would appear that the cable is pretty much toast. If it wasn't before, it pretty much is now that you've cracked it open.
    Either borrow one, or bite the bullet and buy one locally. You're not getting anywhere with that one.

  • Every time I log onto a new site i get the following popup:Content [application/octet-stream] found Do you want to download it to C:\Users\kathy\ ? ... Can someone please tell me what this is and how do I stop this!

    Content [application/octet-stream] found
    Do you want to download it to C:\Users\kathy\ ?
    '''bold text'''

    Back up all data.
    Check the Mail, Contacts & Calendar preference pane to make sure you're not synchronizing Notes in more than one account.
    If you're not, disable Notes synchronization temporarily.
    Quit Notes, if it's running.
    Triple-click the line below to select it:
    ~/Library/Containers/com.apple.Notes
    Copy the whole line of text to the Clipboard (command-C).
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar. Paste into the box that opens (command-V), then press return. A Finder window should open with a folder selected. If it does, move the selected folder — not just its contents — to the Desktop.
    The folder you're moving is named "com.apple.Notes" It is not the subfolder named "Data" or anything else.
    Re-enable Notes synchronization.
    Relaunch Notes and test. If it works now, delete the folder you moved. Otherwise, quit again, and put the folder back where it was, overwriting the one that may have been created in its place.
    Caution: If you delete some or all of the contents of the selected folder, but leave the folder itself in place, the application may not launch. Deleting the folder will cause it to be rebuilt automatically.

  • When I plug in my iPad 2 to my laptop to sync, it says "the file iTunes library itl" cannot be read because it was created by a newer version of iTunes. Can someone please tell me what this means? How do I correct it? Thanks!

    When I plug in my iPad 2 to my laptop to sync, it says "the file iTunes library itl" cannot be read because it was created by a newer version of iTunes. Can someone please tell me what this means? How do I correct it? Thanks!

    The file "iTunes Library.itl" cannot be read because it was created by a newer version of iTunes".
    Try the following user tip:
    Empty/corrupt iTunes library after upgrade/crash

  • Every page in website is different even though they are the same size!  4 Views 0 Replies Latest reply: Sep 25, 2011 4:23 PM by kellynewmac     kellynewmac Level 1 (0 points) Sep 25, 2011 4:23 PM Can someone please tell me what I have done wrong ?

    Can someone please tell me what I have done wrong>?  Obviously I am new to iweb, and need help.  I recently built a website in iweb with only 5 pages, and I made the height, width, & all of the specs regarding the page size exactly the same, but they all load as different sizes on the website.  Also the text i typed loads right away, and the images take forever to load with each page when i look at it on a pc, and not mac.  Can someone please help me!!

    Obviously I am new to iweb, and need help.
    And one of your Services is Webdesign?
    Small consolation : iWeb is a very advanced piece of software. So advanced that even highly skilled professionals have difficulty understanding and using it.
    Anyway, your pages are NOT the same size by design. Which can clearly be seen. But also by checking the source of the pages.
    The Home page is 665px wide and the Contact page is 820px wide. That doesn't happen by magic. It's user induced.
    So do what I do : pay attention to every tiny detail. Especially when it's your business. No excuse.
    Here are some sample Sites :
         http://www.wyodor.net/mfi/
    You can download Domain files for your pleasure to study and use here :
         http://www.wyodor.net/mfi/Maaskant/How_To.html
         http://www.wyodor.net/mfi/size/768-946.html

  • Can someone please tell me what the name "radio" over a telephone contact means.

    Can someone please tell me what the name "radio" stands for over a telephone contact.

    "Radio" seems to be the default label if you're using an Exchange account. Just go into the contact, tap "Edit" in the upper right. Tap the word "radio" and select the label you'd prefer to use.

  • Can someone please tell me what to do if you continue to get the message that your apple id has been disabled?

    Can someone please tell me what to do if you continue to get the message 'your apple id has been disabled'?  I've tried everything suggested in the help section...many times.

    Contact itunes support.

  • I just got home from the Apple Store getting my iphone 4S fixed. I now have "Invalid Sim". Can someone please tell me what to do?

    I just got home from the Apple Store getting my iphone 4S fixed. I now have "Invalid Sim". Can someone please tell me what to do?

    What does it say when you look at Settings=>General=>Carrier?
    Did it work with that sim in the Apple Store?

  • I some how deleted iphoto. i have since tried to install 9.1.1 and cant because i says i need to install 4.0 first which i cant find. can somebody please tell me what to do and where to go. my mac is a 3,1 and am running version 10.5.1

    can some body help me please!!!
    i some how deleted iphoto. i have since tried to install 9.1.1 and cant because i says i need to install 4.0 first which i cant find. can somebody please tell me what to do and where to go. my mac is a 3,1 and am running version 10.5.1

    reinstall iPhoto - go to your receipts folder ("Your hard drive" ==> library ==> receipts) and remove any iPhoto receipts and reinstall from the restore disks that came with your computer - do a custom install of bundled software only
    For more information  <a href="http://www.macworld.com/article/132243/2008/02/pacifist.html"> click here for the MacWorld article on reinstalling OS X applications.</a>
    9.1. is an update and can only be installed if you have purchased iLife '11 on DVD or iPhoto '11 from the App store - and iPhoto '11 will not run on OS 10.5.8 - or 10.5.1
    LN

  • When I try to install itunes I get an error message that says "Canot access internet conection \."  Can someone please tell me what's wrong?  My internet connection is working.

    When I try to install itunes I get an error message that says "Cannot access internet connection \."  Can someone please tell what this means?
    My internet connection is working.

    Okay. We'll try a different utility.
    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • For some reason all of my apple hardware is no longer being found on my itunes account which is windows based. can someone please tell me what i could do?

    My windows based itunes is not finding any of my apple hardware when it is plugged into my computer. Could someone please tell me what i need to do to fix it. i have already uninstalled and reinstalled itunes.

    Restart the computer.
    Try plugging into a different USB port on the computer.
    Try a different sync cable.    

  • At startup my chose application box pops with a question What is null? can someone please tell me what this is?

    at start up my  choose application box appears with the question "what is null?" can someone enlighten me on what this is?

    The third-party system modification "GoFlex" may be contributing to your problem. I suggest you back up all data, then uninstall it according to the developer's instructions. Reboot and see whether there's any improvement.
    Back up all data before making any changes.

  • Can someone please tell me what can interface is?

    On the question sheet I found in my brothers stuff there was a question about completing some interface code, but I've got no idea what an interface actually is, as near as I can tell its a list of methods that a class has. So is it like a contents page of methods that you can call?
    Also, here is the question on the sheet.
    5. Consider the following Java Library interface
    public interface Comparable<T>
    int compareTo(T rhs);
    Complete the implementation of the class below that implements the above interface. The compareTo method should return -1 if value is less than rhs.value, 0 if both sides are equal and +1 if value is greater than rhs.value.
    public class MyInt implements Comparable<MyInt>
    private int value;
    MyInt(int x) {...}
    public String toString() {...}
    public int intValue() {...}
    public int compareTo(MyInt rhs){...}
    public boolean equals(Object rhs) {...}
    In the last 2 weeks I've learnt some much about java just from answering these questions on this work sheet. I'm starting to feel that I actually understand what to do and I'm enjoying it a lot more now, Before I was just throwing lines of code at the compiler and hoping for the best.

    http://java.sun.com/docs/books/tutorial/java/IandI/index.html

  • Can someone please tell me what's wrong with my feed?

    iTunes isn't updating with my most recent podcast, and I can't see what I've done wrong on my feed.
    Can someone help
    www.ministryofslam.com/feed
    https://itunes.apple.com/gb/podcast/ministry-slam-pro-wrestling/id301376618
    It's "Bonus Podcast" that isn't appearing

    At the beginning of the entry for the episode of 21 November you have the opening 'item' tag in twice. This is sufficient to render the feed unreadable and so it's turning up empty when subscribing and the Store is not updating.

  • I am having trouble printing 11x14 photos from 9.5.1 iPhoto. Can someone please tell me what to select?

    I am unable to find how to print a 11x14 photo through 9.5.1 iPhoto. there are different page selections but I cannot find what to select.

    In the Print window don't you have this option?
    If not bring up the Print window from any other application, like Preview, select Manage Custom Sizes under Paper Size:
    There you can add a custom size with the margins set as you want:
    But if you say it supports 11 inch wide paper stock it should have an 11 x 14 layout.

Maybe you are looking for