getting this error on the function g 10 isn't a return type

See the function down
  TYPE ptr IS REF CURSOR;
  FUNCTION check (check_part IN VARCHAR2, check_vendor in varchar2) RETURN ptr;
FUNCTION check(check_part IN VARCHAR2, check_vendor in varchar2) RETURN ptr is
  
   my_ptr ptr;
    
   check_cnt number(30);
   default_cnt number(30);
      
  BEGIN
    
  select count(*) into check_cnt
  from table_one ps
  where ps.part_number = check_part
  and ps.vendors = check_vendor;
  
  select count(*) into default_cnt 
  from table_one lm 
  where lm.part_number = check_part
  and lm.vendors = 'UNKNOWN';
  
  if (check_cnt = 1 and default_cnt = 0) then
   
    OPEN my_ptr  FOR
    
      SELECT tp.id,
            FROM table_one tp 
      WHERE tp.part_number = (check_part)
      and tp.vendors = (check_vendor);
  return my_ptr;  
    
elsif (default_cnt = 1 and check_cnt = 0)  then

      open my_ptr for 
      
      SELECT tp.id,
       FROM table_one tp 
      WHERE tp.part_number = (check_part)
     and tp.vendors = 'UNKNOWN';

return my_ptr;
end if;

  
END check;
Please note that I use oracle 10g all the... Any help is appreciated. Thank you.

Published by: user13328581 on February 6, 2011 19:36

sql_dev wrote:
Hello

Better just to have a simple statement in the else block

ELSE
open my_ptr for
SELECT NULL
FROM DUAL;
return my_ptr;

So whenever the IF fails, your other work without value in the cursor.

In fact, this slider returns a single row that contains a NULL value.
Better add a condition that will always evaluate to false (0 = 1).

Tags: Database

Similar Questions

  • Problem with rename folders in Windows 7: get this error message: "the action cannot be completed because the folder or file is open in another program. Close the folder and try again. »

    When I try to rename a folder in Windows 7 I get this error message: "the action cannot be completed because the folder or file is open in another program. Close the folder and try again. "Can anyone help?

    I gave up and solved the problem by buying a third party software to use as a directory, Directory Opus.  It is much more functional than the Microsoft Directory and I have never problem renaming of files.  I am just amazed that so many people have this problem and Microsoft has not fixed.

  • I get this error during the windows WindowsUpdate_8024A000 updates

    I get this error while the vista sp2 update is there any solution for this? WindowsUpdate_8024A000

    Hello
    The Windows Update 8024 A 000 error Code means THE NOSERVICE WU E. This translates as UA was impossible for incoming calls to THE service.

    I would like for you to perform general troubleshooting steps for Windows Update.
    Method 1: Try to run the fix - it of the article mentioned below, if you not him have not yet tried.
    The problem with Microsoft Windows Update is not working:
    http://support.Microsoft.com/mats/windows_update/
    Method 2: Scan run SFC. Analysis (sfc) System File Checker will Windows replace corrupted or missing system files on your computer.
    Scan sfc enforcement procedure:
    a. Click Start, click principally made programs, accessories, right-click on command prompt and select run as administrator.
    b. click on continue or provide administrator credentials if prompted.
    c. in the type in the following command prompt window and press ENTER:
    sfc/scannow
    Refer to this article for more information:
    http://support.Microsoft.com/kb/929833
    Method 3: Check the hard disk for errors:
    See: http://windows.microsoft.com/en-US/windows-vista/Check-your-hard-disk-for-errors
    Note: Check hard drive for errors will check the bad sectors on the hard drive and repairs. During this process, there is a chance of losing the data in these sectors. Please back up the data before performing this step.
    I hope this helps.
  • Out of nowhere I get this error message "the application could not start properly (0xc000001g). Click OK ot close the application. "I have uninstalled and reinstalled several times.

    I nowhere hand, I get this error message "the application could not start properly (0xc000001g). Click OK ot close the application. "I have uninstalled and reinstalled several times.

    Hi Kingsberry and almathof,

    Please refer to this thread: Re: Premiere Pro 2015 won't open after the recent update

    Thank you

    Regalo

  • I get this error message, the backup disk image "/ Volumes/data-1/jackmatz of Air.sparsebundle of MacBook ' could not be found (error (null)).

    Hey get this error message

    The backup disk image "/ Volumes/data-1/jackmatz of Air.sparsebundle of MacBook ' could not be found (error (null)).

    In the context of what?

  • My outlook express has stopped working and I get this error message, "the connection to the server has failed..." »

    My outlook express no longer works and I get this error: the connection to the server has failed. Account: 'pop-server', server: 'pop-server', Protocol: POP3, Port: 110, secure (SSL): no, Socket error: 10061, error number: 0x800CCC0E. Can someone tell what to do?

    Make sure that you can access your e-mail via webmail, if you have this option to ensure that it is not a problem on the server.  Then locate the antivirus interference and ensure that the analysis of the electronic mail is disabled (see www.oehelp.com/OETips.aspx#3).  Try to remove your e-mail account and then close OE and then add it back again and then see if it works.

    Steve

  • I get this error at the start: could not find capable video game modules

    I need help. After the installation/upgrade to CC PP 2015, I get this error message at startup:

    capable video game modules is not found

    Do you have any suggestions?

    I did everything I can find on this subject.

    1 graphics card automatic switching in System Preferences/Energy Saver unchecked

    2. updated my NVIDIA CUDA software to the version of the driver 7.0.52

    3 trash my preferences Pro first

    All my other apps CC will launch and operate correctly.

    My presentation:

    MacBook Pro (retina, 15 inches, mi 2014)

    Processor: 2.5 GHz Intel Core i7

    Memory: 16 GB

    Graphics card: NVIDIA GeForce GT 750 M 2048 MB

    Hi Mary,

    Thanks for all the information. It indicates that something is inconsistent with your user preferences. Follow these steps:

    Thank you

    Regalo

  • Get this error on the dashboard for the last 2 days: Please try again later we are working to improve your experience of the Enterprise Dashboard.

    When you try to run the company, I received this error for the last two days.  I have tried using another browser and ended in the same results.

    Please try again later

    We are working to improve your experience of the Enterprise Dashboard.

    Hello

    Your proof of cloud creative's 'VIP' instead of the company, so you would not normally manage your CC on the Enterprise Dashboard, but you had some Digital Marketing rights so that's why you have a dashboard.

    I am informed that currently some adjustments are made to your dashboard for Digital Marketing and that it should end soon.

    In the meantime your creative team of cloud management should be available through creative.adobe.com

  • AppData/Roaming/wushep.dll - I get this error at the start of my computer. What is a wushep.dll that the computer says that I'm missing?

    When the computer starts, he says that the C drive is missing a wushep.dll.  Where can I get a wushep.dll?  There is no virus on the computer and all the programs run normally.

    Hello
     
    Welcome to the Microsoft Community Forum.
    It appears from the description, you get code error message "wushep.dll" when you start the computer.
    To better understand the question, answer the questions below.
    1. Exactly when you receive this error message?
    2. Are you able to start on the computer?
    3. You did changes to the computer before the show?
    For now, you can try the troubleshooting provided steps and check if that helps resolve the issue.
    Method 1:
    Step 1:
    Safe mode
    Safe mode starts Windows with a limited set of files and drivers. Startup programs do not work in safe mode, and only the basic drivers needed for OSB are installed
    For more information about Safe Mode, see the link:
    Start your computer in safe mode
    Step 2:
    Clean boot
    To help resolve the error and other messages, you can start Windows Vista, Windows 7 or Windows 8 by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.
    How to perform a clean boot for a problem in Windows Vista, Windows 7 or Windows 8
    Note:
     
    Check the step 3 in the article to start the computer in normal mode.
     
    Method 2:
    SFC scan
    If a Protection of resources Windows (WRP) file is missing or is damaged, Windows may not behave as expected. For example, some Windows functions may not work, or Windows may crash. The tool (SFC.exe) System File Checker scans missing or system corrupted files and repairs them.
    For more information on how to perform the Scan SFC in Windows 7, see the link:
    Use the System File Checker tool to troubleshoot missing or corrupted on Windows Vista or Windows 7 system files
    I hope that using information provided!
    Keep us informed if you have any questions/comments related to Windows.
  • I get this error message 'The URL is not valid and cannot be loaded' when I try to go to Firefox home. I uninstalled the modules, uninstaleed and reinstalled a new fresh firefox which did not help

    I get the following error message 'The URL is not valid and cannot be loaded' when I try to go to firefox home. I uninstalled modules, uninstalled Firefox and then install a new version. Still have the problem.
    Thanks for the help

    This problem may be caused by a corrupt installation of Visual C++ or incomplete (several versions can be installed-by-side; SxS) it lacks certain runtime components (redistributable Packages), which depends on Firefox (problem with an embedded manifest file that specifies a specific runtime version).

    You need to install the missing components (for example, Redistrbutable end 2005 ++).

    • bug 713167 - Microsoft.VC80.CRT SideBySide errors, browsercomps.dll
  • While trying to access another document, I get this "error in the object calling ScriptTypeError not valid."

    Original title: error

    I work in the database search.  In a particular site while trying to access another document, I get this... Error in the object of the invalid ScriptTypeError call.

    How can I fix it?  I be milling of the answers, I went to frequently asked questions, found no answers. I hope someone can help.

    Thank you

    pipster43

    Hi Pipster43,

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for Windows Server on TechNet forum. Please ask your question in the Forums in TechNet Windows Server.

  • Windows Explorer crashes and get this error in the event log: maximum number of ATI EEU session has been exceeded

    Windows Explorer crashes and it is what I have in my event log. Can anyone help?

    Exceeded maximum number of ATI EEU session

    Hi TodFranklin,

    1. when exactly you receive this error message?

    2 did you do changes on the computer before the show?

    Follow the suggestions below for a possible solution:

    Method 1:

    Step 1: Start in safe mode and check if the problem persists.

    Start your computer in safe mode

    http://Windows.Microsoft.com/en-us/Windows7/start-your-computer-in-safe-mode

     

    Step 2: If the problem does not occur in safe mode, you can put your system to boot (in normal mode) to solve the problem.

     

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

     

    Note: After troubleshooting, be sure to configure the computer to start as usual as mentioned in step 7 provided in the above article.

    Method 2: I also suggest that you scan your computer with the Microsoft Security Scanner, which would help us to get rid of viruses, spyware and other malicious software.

    The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

     

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    Important: During the scan of the hard drive if bad sectors are found, the scanner tries to repair this sector, all available on which data may be lost.

    Let us know if that helps.

  • I get this error in the book error log:

    "No master pages applied because the MasterPageMaps table contains no information mapping"

    I don't know what it is, or why it appears now. I've never messed with this feature before. The thing is that I can't get the first document in my book to generate properly as this message began to appear. In my first paper, I have a background image that spans the whole page. It is used as a "cover" for a PDF output. This image vanishes whenever I try to update my book and all formmating on the page is lost.

    Help?

    I use FM unstructured 12.

    * I posted this a few minutes ago, but I kept getting an error... ugh. I'm so frustrated right now...

    OK... stepped away from the office. had a cup of joe, then returned to her and made some research more.

    I found this video: Master Page table mapping. Optimization of productivity for technical communicators. Adobe TV

    He solved the problem.

    I hope that this thread will grab some time. It took me a minute to find this video and, therefore, to get a solution.

    Thanks for all those who read well!

  • I get this error after the last update WindowsUpdate_80200053

    I have the 64 bit version of vist home.

    After the last patch of weeks

    "Microsoft .NET Framework 3.5 Service Pack 1 and .NET Framework 3.5 Family Update (KB951847) x 64

    "Download size: 25,7 to 82.7 MB.

    I get the error WindowsUpdate_80200053. Also now I can't download active x controls, updated maleware deleting files (Spy bot s & D gives check sum errors), any web site, including the Microsoft Update download (I get warnings of the author is unknown and corrupted file warning.)

    My wife has the 32-bit version and having the same problems.

    Hello Stdonitus,

    Please try the steps, in order to verify if there is no virus or Spyware issues below.

    1. run the Microsoft Windows malicious software removal tool

    2 download, install, update and run: (freeware) SUPERAntispyware and Malwarebytes' Anti-Malware (freeware).

    3. run this analysis online (safe mode with network, if possible):
    http://OneCare.live.com/site/en-us/Center/howsafe.htm

    4 see and follow carefully:
    "Looking for / help with software, spyware software malware and Hijackware.

    If you need help with virus-related issues, contact the Support Services Microsoft product.

    Visit the Microsoft Solution Center and antivirus security for resources and tools to keep your PC safe and healthy.  If you have problems with the installation of the update itself, visit the Microsoft Update Support for resources and tools to keep your PC updated with the latest updates.

    If you need more assistance for the position of virus/worm to the Microsoft Newsgroup - security - virus.
    Through your News Reader:
    News://msnews.Microsoft.com/Microsoft.public.Security.virus
    Via the Web:
    http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Security.virus

    I hope this helps.

    [If this post can help solve your problem, click on the button 'Mark as answer' or 'Useful' at the top of this message.] [Marking a post as answer, or relatively useful, you help others find the answer more quickly.]

  • get this error at the launch of sequelae

    "WARNING: error while accessing the preference of the files to the Interior/users/xxxxx/Library/Preferences/Adobe/After Effects / 13.5, please check the file permissions and try again."

    can't start without this message aftereffects

    Help, please

    fix the permissions problem that prevents to start Adobe applications

Maybe you are looking for

  • Import Outlook Express e-mail and addresses

    We install the mail Tbird on xp client. Question: if I import my willingness to data (address book, emails, folders) they always remain on Outlook Express, or they will be gone? Is essentially importing a MOVEMENT or a COPY function?

  • Best method of connection?

    I went away from wireless connectivity in hand (2 iPhones, an iMac and an iPad being the only wireless), but my iMac, printer, 2 x, 2 x, smart TV, DVD player, a PS4 BT TV boxes, booty and a use of Time Capsule a wired network through 3 x PowerLine ad

  • EliteBook 840: How the country of purchase of my laptop?

    Is there a way to tell the country of purchase of a laptop? The SN is {deleted} The product key is H5G19EAR #AK8

  • Droid 4: Incorrect time stamp on received texts

    Last week, my D4 was put incorrect timestamps on incoming text messages when using certain applications of text without share capital. All the texts received (regardless of the sender) are stamped 4 hours earlier when they were actually sent. Threade

  • Information bar warns that all websites accessible by Internet Explorer may be problematic!

    My computer shows 'Inernet Explorer blocked Web sites displaying content with security certificate errors'.  Is this related to the questions of MS Windows Update?  I am running Windows XP.  How can I cure/delete this condition?  I realize that Windo