Process implict cursor records only if the record count is not zero

Hi All,
Hope you are doing gud. I have a problem.
I have a implicit cursor defined as shown below
for c1 in (select * from table_test order by name)
loop
call to some procedures
end loop;
My question here is, I want to call the procedures only if the select statement count is non zero and raise an exception if count is zero.
How would I acheive this..
Please help
Thanks all in advance

user13276239 wrote:
Hi All,
Hope you are doing gud. I have a problem.
I have a implicit cursor defined as shown below
for c1 in (select * from table_test order by name)
loop
call to some procedures
end loop;
My question here is, I want to call the procedures only if the select statement count is non zero and raise an exception if count is zero.
How would I acheive this..
Please help
Thanks all in advanceYou can apply count(*) group function,
begin
select count(*) into variable_1 from table_name;
if variable_1 !=0 then --call to procedure
else raise_application_error(-20000,'Invalid data');
end if;
end;

Similar Messages

  • I have a Rocketfish mini display port to VGA adaptor cord for a macbook pro, it was working fine the first week, now it does not show what I am seeing on my laptop on my lg Flat screen tv. It only shows the space background but not any icons. Any help??

    Is there anything I should do to the TV or any settings i should do from my actual Macbook? It only shows the space background but not any of my icons or what i am seeing on my laptop screen. It is a new adaptor which was purchased last week.

    It seems as though though it may be a connection issue, possibly hardware or adapter. Make certain the connections are TIGHT.
    For software you may try a smc reset:
    Shut down the computer.
    Plug in the MagSafe power adapter to a power source, connecting it to the Mac if its not already connected.
    On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
    Release all the keys and the power button at the same time.
    Press the power button to turn on the computer. 
    Note: The LED on the MagSafe power adapter may change states or temporarily turn off when you reset the SMC.
    Try a pram reset:
    Shut down your Mac.
    Locate the following keys on the keyboard: Option, Command (⌘), P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on your Mac.
    Immediately press and hold the Option-Command-P-R keys. You must press this key combination before the gray screen appears. Continue holding the keys down until your Mac restarts, and you hear the startup sound for the second time.
    Release the keys.
    If no joy you can take it in to an Apple store genius bar for a free evaluation make an appointment first.
    http://www.apple.com/retail/geniusbar/

  • How can I restore my data from iCal? I didn't make any backup, but I use  time machine with an external HD. I deleted iCal when I deleted my gmail account. I have tried to restore, but I can only restore the iCal software and not the data.

    How can I restore my data from iCal? I didn't make any backup, but I use  time machine with an external HD. I deleted iCal when I deleted my gmail account. I have tried to restore, but I can only restore the iCal software and not the data.

    So what is your question?
    If you forgot your encryption password:
    Warning: Make sure it's a password you will remember or write it down for safekeeping. If you encrypt an iPhone backup in iTunes and forget your password, you can't restore from backup and your data will be unrecoverable.
    If you can't remember the password and want to start again, you must perform a full software restore and chooseset up as a new device when iTunes prompts you to select the backup from which to restore.
    The above comes from here:
    http://support.apple.com/kb/HT4946

  • Need to backup and remove photo library form my iphone.  This library was previously backup on a hard drive that crashed.  So these photos are only in the photo library and not in the camera roll.  If I do a full backup, it only takes the camera roll.

    Need to backup and remove photo library from my iphone.  This library was previously backup on a hard drive that crashed.  So these photos are only in the photo library and not in the camera roll.  If I do a full backup, it only takes the camera roll.
    So this is a 2 part question:
    1) how to I backup the Photo Library to my new hard drive (as the last one was unrecoverable but previously backed up)
    2) how do I remove the Photo Library form my phone (preferably after backup in item 1)
    Thanks, Janis

    Since it has always been very basic to backup your computer and all it's data, Apple provides no way for you to transfer music from your iPhone back to your computer.  As you know, you can re-download all iTunes purchases, but music that you ripped yourself you'll have to just re-rip again.
    You can try and find 3rd party applications that might help you.  I'm sure you'll pay, however.
    Let this be a very important lesson learned.
    Best.

  • I am trying to do a factory reset on my macbook air, but when I do the command   power button, I am only seeing the macintosh HD option not the recovery hd option previously mentioned.

    I am trying to factory restore my macbook air, I tried following a youtube video performing the option + power button and am only getting the macintosh HD option not the recovery HD option. Is there another way to reset the computer?

    The proper shortcut is COMMAND-R, not  COMMAND-PowerButton. See the following:
    Install or Reinstall Mavericks or Mountain Lion from Scratch
    Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
    OS X Mavericks- Erase and reinstall OS X
    OS X Mountain Lion- Erase and reinstall OS X
    OS X Lion- Erase and reinstall Mac OS X
    Note: You will need an active Internet connection. I suggest using Ethernet if possible
                because it is three times faster than wireless.

  • I updated my LG G3 this week and now it SUCKS!  When I'm connected to WIFI, nothing on Facebook works.  The photos and videos won't populate.  I have to turn off the WIFI and only use the mobile data. Not to mention, I really hate the way it looks now.

    I updated my LG G3 this week and now it SUCKS!  When I'm connected to WIFI, nothing on Facebook works.  The photos and videos won't populate.  I have to turn off the WIFI and only use the mobile data. Not to mention, I really hate the way it looks now.   Before I updated my phone, I really liked it, now I don't like my phone at all!  When will this be fixed? I hope it's soon.  I'm thinking of changing providers now.

    Does the iOS device connect to other networks? If yes that tend to indicate a problem with your network.
    Does the iOS device see the network?
    Any error messages?
    Do other devices now connect?
    Did the iOS device connect before?
    Try the following to rule out a software problem:                
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on your router
    .- Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections
    - Wi-Fi: Unable to connect to an 802.11n Wi-Fi network      
    - iOS: Recommended settings for Wi-Fi routers and access points
    - Restore from backup. See:
    iOS: How to back up
    - Restore to factory settings/new iOS device.
    If still problem and it does not connect to any networks make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar

  • I want a soundbar for my 6th generation nano but am having trouble finding a compatible device. I'd like more than a dock, ideally a soundbar with wireless subwoofer. I'll only use the soundbar for music, not TV home theater. Any suggestions?

    I want a soundbar for my 6th generation nano but am having trouble finding a compatible device. I'd like more than a dock, ideally a soundbar with wireless subwoofer. I'll only use the soundbar for music, not TV home theater. Any suggestions? Thanks.

    Google

  • I have 5 devices all on one itune account.i have not activated icloud because i dont want it to sync all our information together. is there a way to set it up to only sync the music together and not the contacts photos messages etc

    i have 5 devices all on one itune account.i have not activated icloud because i dont want it to sync all our information together. is there a way to set it up to only sync the music together and not the contacts photos messages etc

    Unless you subscribe to iTunes Match, iCloud doesn't sync music.  Just set up every person's devices on a separate iCloud account and your iCloud data and photo stream will remain separated.  Each iCloud account will need a separate ID, but it does not need to be the same as your iTunes ID.  You can continue to share the same iTunes ID and maintain separate iCloud accounts with separate IDs for iCloud.
    You'll also want to use separate IDs for each person for iMessage and FaceTime.  This will keep your text messages and FaceTime called separated as well.  The easiest way to do this is to have everyone use their iCloud ID for these two services as well.

  • I bought a movie on iTunes and when it loads up I can only play the bonus features and not the actual film. The title screen is also glitched and merges with the scene selection. I don't think it downloaded properly. what can I do?

    I bought a movie on iTunes and when it loads up I can only play the bonus features and not the actual film. The title screen is also glitched and merges with the scene selection. I don't think it downloaded properly. what can I do?

    It happens sometimes. Delete the current copies, don't hide from iTunes in the cloud if prompted, close iTunes, reopen, download from iTunes Store > Quicklinks > Purchased > Music > Not on this computer.
    While downloading click the download icon at the top right and uncheck Enable simultaneous downloads. You may find it more reliable that way.
    tt2

  • Why is it that when i connect my ipad the laptop only detects the storage and does not allow me to send any files to it?

    Why is it that when i connect my ipad the laptop only detects the storage and does not allow me to send any files to it?

    The iTunes application is used to transfer content to the iPad.
    See http://www.apple.com/itunes/download/

  • Page number to get displayed only when the page count is more than 1

    Hi Gurus,
    My requirement is to print page numbers ONLY if the page count is more than 1 ,i.e. if the data getting displayed in 1 page only then don't print "Page n of m" but if it is getting displayed in more than 1 page then display "Page n of m" on TOP right corner.
    I selected "Page n of m" and it creates 3 fields in object hierarchy i.e TextField CurrentPage, TextField PageCount and Static Text field Pages.
    I go to the ready:layout of PageCount object, and use below script:
    this.rawValue = xfa.layout.pageCount(); 
    if (this.rawValue == 1) {
    this.parent.Pages.presence     = "invisible";
    I looked at the message Page number not to display but it doesnot resolve my problem.
    Please help me out.
    Regards
    Ajay

    Hello Ajay,
    Script do not work for TextFields.  to get the page numbers displayed.  Select Text field from library and Go to Object Pallete, Value tab and select "Calculated - Read Only" in Type and choose Runtime property.  There you can find the Number of Pages.
    Once this is the text field, you can write script on it. 
    If(this.rawValue == 1)
      this.presence = "invisible"
    similarly write script for total number of pages, but make sure that variable is accessed properly.
    Please let me know, if you still see some issues with it.
    Thanks,
    Rakesh

  • In Textedit, how do I copy a hyperlink url, but only copy the link location and not the link text?

    Suppose I have a list of hyperlinked internet URL's. I want to extract their Internet addresses -- the link locations --  which are essentially hidden in the link text. Is there any way to select and copy the list of hyperlinks, but only copy the link locations, and not the link text?
    For example, with the links:
    The White House
    Google
    One of my previous posts
    What I really want to copy are: "http://www.whitehouse.gov/", "http://www.google.com/", and "https://discussions.apple.com/thread/2737556".

    I figured out how to do it. First, copy the hyperlinks onto a blank RTF document in TextEdit and save the file.
    Second, open the file from within TextEdit, and make sure that the box "Ignore rich text commands" is checked in the open file dialog box. In the open document, the hyperlinks from my example in my first post will look like this:
    {\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
    {\fonttbl\f0\froman\fcharset0 Times-Roman;}
    {\colortbl;\red255\green255\blue255;\red0\green7\blue232;}
    {\info
    {\author Garald P. Weller}
    {\*\copyright Garald P. Weller}}\margl1440\margr1440\vieww20000\viewh14400\viewkind0
    \deftab720
    \pard\pardeftab720\sa240\ql\qnatural
    \f0\fs24 \cf0 \
    \pard\pardeftab720\sa240\ql\qnatural
    {\field{\*\fldinst{HYPERLINK "http://www.whitehouse.gov/"}}{\fldrslt \cf2 \ul \ulc2 The White House}}\
    \pard\pardeftab720\sa240\ql\qnatural
    {\field{\*\fldinst{HYPERLINK "http://www.google.com/"}}{\fldrslt \cf2 \ul \ulc2 Google}}\
    \pard\pardeftab720\sa240\ql\qnatural
    {\field{\*\fldinst{HYPERLINK "https://discussions.apple.com/thread/2737556"}}{\fldrslt \cf2 \ul \ulc2 One of my previous posts}}\
    Third, use the Automator function, "Get URLs From Text," to create a service, which I called "Get URLs From Text," that receives text from any window, gets the URLs, and copies the result to the clipboard:
    Fourth, select the entire page above, and go to TextEdit > Services to activate the "Get URLs" service.
    Fifth, create a new TextEdit document, and paste the result.
    The output is exactly what I wanted, the URLs -- i.e., the link locations -- of the three web pages, without the link text.
    Another utility that will extract URLs is CopyPaste Pro, which has an innate ability to extract Internet addresses from either web pages or text pages.

  • Reset Cleared Doc - Balance of the line item is not zero" Message no. F5136

    I have this error : Balance of the line item is not zero" Message no. F5136
    This error arise when we tried to reset cleared document dated June 6,2007 during data migration from Legacy system to SAP.
    We wanted to reset this cleared document because it was wrong executed (cleared) way back 2007.
    The entries are:
    Debit to GL (B/S) --> 3,758.48
    Credit (1100039-Vendor) with special GL (408319) --> 3,758.48
    =====================================================
    For us to correct the clearing, we need to reset first the cleared document  via FBRA, however, this error arise saying "Balance of the line item is not zero" with Message no. F5136.
    I read several posted issue here, however, it doesn't resolve my problem.
    Hoping to hear from your inputs on this problem.
    Regards,
    macalonge

    Dear:
                    SAP  Note 400530 - FBRA - F5136: Balance of line items not zero
                    describes your issue as
    Summary
    Symptom
    A payment using a payment card fails, in other words, the payment is reversed using Transaction FBRC where the customer or vendor item is reopened.It is not possible to reset a payment document posted again for the open customer or vendor item by using Transaction FBRA, "Reset Cleared Items" and it responds with the error message "Balance of the line items is not zero".
    Other terms
    Error message F5136, FBRA, FBRC, payment cards
    Solution
    A solution is available in the Support Package for Release 4.0B and 4.6C. An advance correction is possible. The solution consists of a repair report, so that the current payment document can be reset by means of 'Reset Cleared Items', and of a correction.
    1. Repair-report ZREPAIR_BSEGC_FBRA:Create it temporarily as a test report using Transaction SE38. First the current payment/clearing document must be cleaned up of payment card data by means of the repair-report. Afterwards you can reset the payment document by means of 'Reset Cleared Items'. The report takes the current payment document as a parameter. In this case only changes are made to the database if the option "DO_UPD" is set.
    2. Advance correction:Supplement the interface for function module CREDIT_CARD_POST_REFUSAL with table parameter T_BSEG with reference type BSEG. The following describes the procedure in more detail.
    a) Transaction SE37: Enter function module CREDIT_CARD_POST_REFUSAL and choose "Change".
    b) On the "Tables" tab page, create parameter T_BSEG with reference to structure BSEG.
    c) Save and activate the function module.
    3. After you implemented the correction or the R/3 Support Packages valid for this note, read Note 450081 to avoid the unwanted deletion of payment card data.
    Hope it will help
    Regards

  • Balance of the line items is not zero

    Hi All,
    We are trying to reverse the clearing document t.code FBRA but could not reverse it and getting below mentioned error.
    Balance of the line items is not zero
    Message no. F5136
    We have implemented the S note 1914004 but the results are the same.
    Thanks
    Ramanjaneyulu

    Hi Ramanjaneyulu,
    If you reset a clearing with transaction FBRA, a check of zero balance
    occurs first in all local currencies. With a balance that is not equal
    to zero the system issues message F5136 and it is not possible to reset
    the clearing.
    Regarding your issue itself, based on my analysis of the information
    provided and from previous experience with error message F5136 when
    running FBRA please let me highlight some of the most common reasons
    for this error to be raised:
    - GL account is being changed by any substitution: HKONT is expressly
    forbidden for substitution (check BXCLUDE from table GB01 by standard
    the field is flagged) if this field is being changed by a substitution
    or user exit this is most likely the root cause for error message
    F5136, however as this is considered a modification it falls of the
    product support scope.
    - Documents involved have being archived: Since the related documents
    are archived, the balance of document is not zero and error message
    F5136 appears. It is not possible to reverse
    the clearing document because system cannot find the documents that
    were cleared to change their status to open.
    - Any of the documents contain field BSEG-RFZEI <> 000: This kind of
    document cannot be reversed via FBRA. Please refer to note
    1301679 this note contains valuable information regarding
    this system behavior.
    I hope this could be helpful. Thank you.
    BR,
    Jimmy

  • Balance of the line items is not zero in FBRA

    Hi Team,
    we are resetting customer cleared docuemnt using FBRA t ocode it giving erro message like "Balance of the line items is not zero". we tried all possibilities, but it is giving same error. we search in SCN.SAP and found one note 1914004. but we are unable to download it. we tried
    FBU8 - Reverse this tcode also. but same error.

    Re: Problems reversing a Clearing document
    udayakumar krishnaraj Nov 9, 2011 9:15 AM (in response to Reddy D)
    Hi,
    Use transaction code FBRA for Reversal of Clearing Document.
    System will ask for2 option
    1. RESET
    2RESET and REVERSE
    Select 2 option you clearing document will get reset I.E become open and then it will get revered automatically.

Maybe you are looking for

  • Cannot transfer videos and Photos from Iphone 3GS to my PC or MacBook

    I have an Iphone 3G and my wife has a 3GS. On the 3G Windows XP or my MacBook will see the iphone as a camera. But on the 3GS neither OS will see the iphone as a camera. They both just open Itunes I took a lot of video over the weekend with the 3GS a

  • Apple TV, HD TV and Bose 18 System

    I recently upgraded to the 2nd gen. Apple TV and have connected the HDMI cable from the Apple TV to the HDMI plug on the HDTV. The picture and sound are fine between the TV and AppleTV with this connection. Whats the problem then? Well, I want the so

  • Which MacBook Pro is the best for me

    Hello, I was looking to purchase a MacBook Pro but the thing is I don't know which one to get. It is between the 13-inch: 2.4GHz with Retina display Specifications 2.4GHz dual-core Intel Core i5 Turbo Boost up to 2.9GHz 8GB 1600MHz memory 256GB PCIe-

  • Realplayer or Windows Media Player for iPhone

    iphone is working fine for listening to programs that are podcast, but a lot of the stuff i want to hear is only available on realplayer or windows media player. don't really want to sit at my computer and listen to it, would rather do it at work whe

  • Is Perl part of default Solaris Installation ?

    I am devloping an application which invokes a few perl scripts during installation. I just want to know: Is Perl part of default/standard Solaris Installation ? How safe is it to assume existence of Perl on client-side Solaris System? Thanks & Regard