How do you change a function to a procedure

I have written a function which works fine in Oracle, but our .NET developer is struggling to call the function from the web client. Apparently .NET isn't great for working with Oracle functions and needs me to change my function to a procedure. Is it possible to change a function (which is designed to return a value) to a procedure (which is designed to 'do something')?
FUNCTION get_user_basket_item_count (
p_usr_id IN VARCHAR2,
p_basket_id IN VARCHAR2 DEFAULT NULL
RETURN NUMBER
IS
v_count_result NUMBER (38);
BEGIN
IF p_basket_id IS NOT NULL
THEN --return specified basket count
SELECT COUNT (oubi.ID)
INTO v_count_result
FROM ol_user_baskets oub, ol_user_basket_items oubi
WHERE oub.ID = oubi.bas_id
AND oub.usr_id = pA_usr_id
AND oub.ID = p_basket_id;
ELSE --return default basket count
SELECT COUNT (oubi.ID)
INTO v_count_result
FROM ol_user_baskets oub, ol_user_basket_items oubi
WHERE oub.ID = oubi.bas_id
AND oub.usr_id = p_usr_id
AND default_basket = 'Y';
END IF;
RETURN NVL (v_count_result, 0);
END get_user_basket_item_count;
The .NET developer has told me i will need to add an 'OUT' parameter. Any ideas?
Cheers
David

PROCEDURE get_user_basket_item_count (
p_usr_id IN VARCHAR2,
p_basket_id IN VARCHAR2 DEFAULT NULL
P_count_result OUT NUMBER
IS
v_count_result NUMBER (38);
BEGIN
IF p_basket_id IS NOT NULL
THEN --return specified basket count
SELECT COUNT (oubi.ID)
INTO v_count_result
FROM ol_user_baskets oub, ol_user_basket_items oubi
WHERE oub.ID = oubi.bas_id
AND oub.usr_id = pA_usr_id
AND oub.ID = p_basket_id;
ELSE --return default basket count
SELECT COUNT (oubi.ID)
INTO v_count_result
FROM ol_user_baskets oub, ol_user_basket_items oubi
WHERE oub.ID = oubi.bas_id
AND oub.usr_id = p_usr_id
AND default_basket = 'Y';
END IF;
p_count_result= v_count_result;
END get_user_basket_item_count;

Similar Messages

  • How do you change the slide background colour in the keynote app?

    How do you change the slide background colour in the keynote app?

    You can't (not in Keynote for iOS). The background color is a function of the template selected when you create the file initially and cannot be altered. the only workaround I know of is to add a graphic file to the slide and position it behind all other content, but this would need to be repeated on any slide you wish to "recolor".

  • How do you change the timeline duration in Photoshop CC?

    There seems to be 5 second limit on the duration of the timeline in Photoshop version 2014.
    How can you extend the duration of the animation? There's a timeline window, but no "animation" window as mentioned in many of the help files.
    How do you change the duration in Photoshop  2014?
    I'm using Windows 8.1 as my OS.
    Thanks.

    Thanks for the reply, but my point was not about the lack of creating animations.
    It seems that in Photoshop CC, you cannot change the duration of the timeline unless you click on the end of a clip and drag it out which will then give you more time.  As the original post mentioned, you automatically get a 5 second duration unless you have a video clip that is of longer time.  This all makes sense for videos, I understand that nobody (usually) wants to stretch video.  Video by nature will extend the timeline based on how much footage is present.
    Now take an animation scenario where you want to create something from scratch that spans longer than the default 5 seconds.  There is no option!!! No document settings, nothing that will allow you to extend the timeline.  I now have to click and drag each layer clip on the timeline to give it more time for the animation, one by one might I add (you can't even highlight multiple clips and extend them all at once, which is crazy).
    So what does this mean?  Well if you create a mockup of something with all of these intricate layers including backgrounds, copy etc. and you only intended to animate a certain piece for say 8 seconds, you'll have to extend each and every single layer clip in the timeline otherwise they will magically disappear and the only thing displaying is that which you have extended manually.
    The reason why you need a document settings in the timeline is to prevent content from disappearing if something extends for a certain amount of time.
    Frame by frame animations only allow for so much functionality, try to animate multiple objects at once with frames and go back and make a change to one part...
    CS5 would simply show everything regardless if they did nothing on the timeline, it allowed you to see all of your elements present.
    Again, I stand by my statement saying that the new timeline is flawed.

  • How do you change the My Info data?

    I have a couple of questions I hope someone can help me with.  First, how do you change the data listed on MY INFO?  Secondly, when I go to MY CONTACTS I do not get the + to add or the edit function.  Can someone please help with these questions?

    go to Settings -> General -> Siri->my info and choose from the contact list the right info. If your information in the contact list is wrong, then yu might want to start with correcting that info first

  • How do you change the colors of individual cells within a 2D array?

    How do you change the colors of individual cells within a 2D array of numeric indicators?
    I want the VI to check a data value and if it is failing, white out a square at a specific index coordinate.  I have it working with color boxes, but I'm not sure how to use the property node function, to change the color of individual cells, by coordinates.
    I have attached the VI using color boxes. If you run the VI, the box corresponding to the Step control should turn white.
    I want to do the same thing, using numeric indicator boxes inside the array.
    Thanks for any suggestions...
    Attachments:
    Fill DME matrix.vi ‏95 KB

    Get rid of all these sequences! That's just bad form.
    Your code has a few logical problems. Why do you create a boolean array if you later only look at the last element (Yes, the FOR loop does nothing useful, except in the last iteration because your outputs are not indexing. All other iterations are useless, you only get the result of the last array element. My guess is that you want to color the index white if at least one of the numbers is out if range. Right?
    It is an absolute nightmare to manage all your numeric labels. Just read them from a 2D array. Now you can simply find the index of the matched elements and don't have to spend hours editing case structure conditions.
    Attached is a simple example how you would do what I meant (LV7.1). Modify as needed.
    Message Edited by altenbach on 04-04-2006 02:04 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Fill_2DME_matrixMOD.vi ‏70 KB

  • When curser is on hyper link the url will diplay on the bottom of the screen in the background.(where done is located when site is loaded) How do you control this function?

    When curser is on hyper link the URL will display on the bottom of the screen in the background.(where done is located when site is loaded) How do you control this function?

    Do you want to control that via code on a web page to prevent visitors from seeing the link or do you ask as a Firefox user?<br />
    Tools > Options > Content : JavaScript > Advanced > Allow Scripts to:
    [ ] "Hide the status bar"
    [ ] "Change the status bar text"
    The Status Bar will be gone in Firefox 4.0 and is replaced by the (View > Toolbars) Add-on bar that extensions can use.

  • How do you change direction of the delete button from "delete backward" to "delete forward"?

    how do you change direction of the delete button from "delete backward" to "delete forward"?

    Hold the function (fn) key down while clicking delete.

  • How can you change your security question for I tunes?

    How can you change your security question for I tunes?

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then the steps half-way down this page give you a reset link on your account : http://support.apple.com/kb/HT5312
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 link above to add a rescue email address for potential future use

  • How do you change your thumbprint for iPhone 5s?

    How do you change your thumbprint for the iphone 5s?

    Go to Settings > General > Touch ID & Passcode, enter your passcode, then Turn Passcode Off will delete all current fingerprints. You can then turn passcode back on and enter fingerprints.
    Rather than deleting, you can also add the same fingerprint a second time via "Add a fingerprint" in Settings > General > Touch ID & Passcode, enter your passcode, then Touch ID.

  • How do you change to single click to open files and folders?

    How do you change from double clicking a file/folder, to single clicking (web style)?

    Finder > Preferences
    Turn it off it irks you. I find it exceedingly useful.

  • HT5312 How do you change the email address used to send security answers?

    How do you change the email used to send the security answers you have forgotten? I have changed the alternative email adress in Name, ID and Email Addresses but this does not change the email address in the Password and Security section.

    Jus what do you want to accomplish? The Apple ID email address is used for variosu thing onthe iPod like:
    - For purchasing media. Srrings.iTunes and App stores. Sing out and sign into anoterh account
    - Settings>iCLoudl for iCloud account
    - Settings>FaceRome for Apple ID and where You can Be Reached At email address
    - Settings>Messages for Send And Receive email address.
    - Maybe for Game Center

  • Same question for the "2 iPhones in one account".....How do I change the name.  My iPhone is showing my wife's iPhone name when I am syncing it.  Why is that?  I know about using one iTunes account....But how do you change the name w/o erasing your data?

    Hi....How do you change the name?  When I sync my iPhone, it shows my wife's name on it?

    Unfortunately it is not doing it....
    Let me give more details..We have 3 iPods and 2 iPhone4....I recently purchased the iPhone4 and when we connected it..It was already reading my wife's iPhone4..We went to the Apple Store at the Grove today and was told to de-authorize the system and connect my iPhone4 back and I should be able to change the name.
    Nothing happened..Right now, I clicked on RESTORE settings...and it is uploading a new iPhone update. 

  • How do you change multiple songs genre at the same time

    How do you change multiple song's genre at the same time with out during them one a time in ITunes  on Windows 8?

    You can select a range of songs by selecting the first, then holding shift when clicking on the last. You can ctrl+click to add or remove from the selection. Once you have a selection press Ctrl+I to Get Info. Type in the new Genre and press OK.
    tt2

  • HT204053 I used one Apple ID to set up iCloud after iOS 6 was downloaded to my iPhone, now I want to change the Apple ID for iCloud on my iPhone but I'm unable to. How do you change the ID after it's been set up?

    I used one Apple ID to set up iCloud after iOS 6 was downloaded to my iPhone, now I want to change the Apple ID for iCloud on my iPhone but I'm unable to. How do you change the ID after it's been set up?

    See https://discussions.apple.com/message/19218571#19218571.

  • How do you change your apple id on your iphone 5

    how do you change your apple id on your iphone 5. I also increased storage and cannot update to latest software upgrade! ANNOYING!!!!
    Yes, I logged in and out of the Ap Store and it is correct on that end. I have signed in on my PC too and connected cell. I am out of tactics to resolve! Please help!

    If your phone is signed into an old ID and you are trying to change it to an updated version of the old ID, do the following:
    Make sure you are signed into iMessage and FaceTime with your current ID.  If they are signed into the old ID, go to Settings>Messages>Send & Receive and Settings>FaceTime, tap the ID, sign out, then sign back in with your current ID.
    Then temporarily recreate the old ID by going to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  (You should not have to verify the old email account so it doesn’t matter if you no longer have access to it.)  Now go to Settings>iCloud, turn off Find My iDevice and enter your current password when prompted (even though it prompts you for the password for your old ID).  When finished goThen go to Settings>iCloud, tap Sign Out (or Delete Account if you are not running iOS 8) and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address back to the way it was.  Now you can go to Settings>iCloud and sign back in with your current iCloud ID and password (your data will download back to your device).

Maybe you are looking for

  • Upgraded Mini: Link speed = 130Mbps, Transmit rate = 65Mbps

    It was a long night last night.  I finally upgraded my old Mini (Late 2006) with a compatible Atheros AR9280 wifi card.  It's already been upgraded years ago to 2GHz C2D, SSD, 2GB RAM - running Snow Leopard 10.6.8.  So wireless-N is really the last t

  • The Illustrator CC doc icon now bounces...... errrr why?

    Hi, Can anyone tell me how to turn off the bouncing doc icon on Illustrator CC? (OS X) I work with large files that can take a while to save and so while they are saving I get on with other stuff (if a web page takes more than 5 seconds to load anoth

  • Error with Forms6i accesing Microsoft SQL Server 7

    Hello every body, this is my problem: - Forms6i - OCA 6.0.5.35 - Microsoft Sql Server 7.0 I can access to SQL Server database with Oracle SQL*Plus release 8.0.6.0.0 with no problem. But developing a form when i try to create a new data block with the

  • Default parameters are missing in the cloned EUL

    we have discoverer up and running perfectly on our existing instance - SIGMA now we have a new instance - ALPHA, we cloned the whole EUL from old instance(SIGMA), IN ALPHA every thing is working fine, we have all the BA,folders and all the workbooks

  • CALL FUNCTION 'crm_mktbp_merge_bps' does not write to database

    Hello Experts, i try to use the function call 'crm_mktbp_merge_bps' to merge the marketing attributes of two business partners (contact persons). Inital situation: Business partner 1 (lv_ap_guid) is maintained with 1 profile and its attributes. Busin