Make a private function

Try to adjust a function in a package to make it private. Then set the procedure to use to display the results of the function
It seems to be going in circles HELP!
Thank you
Carpet


It's the original packaging


CREATE OR REPLACE PACKAGE order_info_pkg
FUNCTION ship_name_pf
(p_basket in NUMBER)
RETURN VARCHAR2;
PROCEDURE basket_info_pp
(p_basket in NUMBER,
p_shop ON the NUMBER,
p_date DATE);
END;
/
CREATE OR REPLACE PACKAGE BODY order_info_pkg
FUNCTION ship_name_pf
(p_basket in NUMBER)
RETURN VARCHAR2
IS
lv_name_txt VARCHAR2 (25);
BEGIN
SELECT shipfirstname. » '|| shiplastname
IN lv_name_txt
OF bb_basket
WHERE idBasket = p_basket;
RETURN lv_name_txt;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT. Put_line ('invalid cart id');
END ship_name_pf;
PROCEDURE basket_info_pp
(p_basket in NUMBER,
p_shop ON the NUMBER,
p_date DATE)
IS
BEGIN
SELECT idshopper, dtordered
IN p_shop, p_date
OF bb_basket
WHERE idbasket = p_basket;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT. Put_line ('invalid cart id');
END basket_info_pp;
END;
/



And this is my adjusted with the returned errors


CREATE OR REPLACE PACKAGE order_info_pkg
PROCEDURE basket_info_pp
(p_basket in NUMBER,
p_shop ON the NUMBER,
p_date DATE,
p_shipname OUT VARCHAR2);
END;
/
CREATE OR REPLACE PACKAGE BODY order_info_pkg
FUNCTION ship_name_pf
(p_basket in NUMBER)
RETURN VARCHAR2
IS
lv_name_txt VARCHAR2 (35);
BEGIN
SELECT shipfirstname. » '|| shiplastname
IN lv_name_txt
OF bb_basket
WHERE idBasket = p_basket;
RETURN lv_name_txt;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT. Put_line ('invalid cart id');
END ship_name_pf;
PROCEDURE basket_info_pp
(p_basket in NUMBER,
p_shop ON the NUMBER,
p_date DATE,
p_shipname OUT VARCHAR2)
IS
BEGIN
SELECT idshopper, dtordered, ship_name_pf (p_basket)
IN p_shop, p_date, p_shipname
OF bb_basket
WHERE idbasket = p_basket;
DBMS_OUTPUT. Put_line(p_basket||) e '|| p_shop | » '|| p_date | » '|| p_shipname);
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT. Put_line ('invalid cart id');
END basket_info_pp;
END;
/

PACKAGE BODY ORDER_INFO_PKG errors:

LINE/COL ERROR
-------- -------------------------------------------------------------
24/4 PL/SQL: statement ignored
24/33 PLS-00231: function 'SHIP_NAME_PF' is not usable in SQL
24/33 PL/SQL: ORA-00904: invalid identifier
SQL >

Hello

It's because you're trying to use a function in a SQL statement. Just call the function outside SQL:

PROCEDURE basket_info_pp
(p_basket in NUMBER,
p_shop ON the NUMBER,
p_date DATE,
p_shipname OUT VARCHAR2)
IS
BEGIN
SELECT idshopper, dtordered
IN p_shop, p_date
OF bb_basket
WHERE idbasket = p_basket;
p_shipname: = ship_name_pf (p_basket);
DBMS_OUTPUT. Put_line(p_basket||) e '|| p_shop | » '|| p_date | » '|| p_shipname);
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT. Put_line ('invalid cart id');
END basket_info_pp;
END;

Tags: Database

Similar Questions

  • How to make a hollow functions var?

    Can someone explain how to make a hollow functions var?

    Daniel

    Do you mean something like this?

    var itemsearchcount = null;
    
    previewdata();
    nextviewdata();
    
    function previewdata(){
        // do something
        itemsearchcount = 1;
        return itemsearchcount;
        };
    function nextviewdata(){
        // do something more
        alert(itemsearchcount);
        };
    
  • Is there a way to make the private areas (members only) through muse?

    I'm doing a site and want to make a private members area.

    Try this: this reference page: can I create a password protected for members only page?

    PASSWORD PROTECT A PAGE WITH A PRETTY BOX DESIGNED IN YOUR PAGE

    FINALLY, I FOUND A RESPONSE TO PASSWORDING, A PAGE OR A SECTION WITH ADOBE MUSE WITH GREAT SIMPLICITY AND ALLOWS YOU TO 'DESIGN' THE PASSWORD BOX ON YOUR PAGE!

    Even better, is that you don't HAVE to have the user name AND password (although you can if you wish), then just a PASSWORD simple box, then enter the button DESIGNED BY YOU ON YOUR PAGE, rather than nasty popups etc.  What is important, the password itself is NOT in the source code of your page either!

    The solution is to Jotform.com. I believe you can do this with a FREE ACCOUNT, even if it's SUCH a service for Musers I paid for an appropriate account.

    Before doing this, create a page on your site by saying "bad password. Please go"or something to that effect. You'll need it for when they enter the wrong password.

    Thus, in Jotform, you just create a new form and:

    1 drag a password box (it's in the power tools section)

    2. Select and go to the Conditions

    3. go to edit the URL thanks after submission

    4. Enter: If [name of your password box] is equivalent to [ENTER your password]

    5. in the box "and then redirect to", enter the URL of your protected page and click Save

    "6. in the box of click 'Add a NEW CONDITION' and do the SAME as stets 3-5 but this time say NOT EQUAL to" with your password even in the box "then redirect to", enter the URL of your page to WRONG PASSWORD and click Save

    7 stir the button on your page and you're done!

    If you want messing around with EXACTLY one square to the right alignment button and text aligned, you can go to preferences then in the box that allows you to add your own custom CSS, enter the following code and messing around with the values until it's perfect for you:

    . Form-buttons-wrapper {padding-top: 3px! important ;} #id_2 {margin left:-50px! important ;}}}

    Here's an example, built in Muse: www.hileytv.com/about.html

    I hope this helps my fellow Musers!

    Marcus

  • How to make a components functions or eventhandlers visible from the outside

    Afternoon,

    I created a custom component with some public functions called function1, function2 function3 (no real names) my question is I am willing to do the below

    < custom: Com1 height = "100%" width = "100%" function1 = "{this.someFunction}" / > "

    problem is that the function1 is not visible outside Com1,

    My second question is how do I mark my functions as events, so when you look at intellisense they lightning rather than methods I think that the two are closely linked.

    few things are more my code for all my components is separated from my mxml via setting one actionscript actionscript for the parent class, and the class extends hbox or application. hope this makes sense, I am a vb developer not an actionscripter, which is probably why I'm doing something obviously wrong...

    Thanks in advance for any help

    See you soon

    Tom.

    1. you must tell you all that this component has events

    [Event (name = "showPreview", type = "flash.events.Event")]

    2 dispatches the event when it comes

    private void clickHandler(event:MouseEvent):void

    {

    var eventObject:Event = new Event ("showPreview");

    dispatchEvent (eventObject);

    }

    3 listen to the event from outside the component

    customComponent:Component showPreview = "showPreviewHandler (event)" / > "

    4 handle the event.

    private void showPreviewHandler(event:Event):void

    {

    }

  • How can I make my private search history?

    I don't want to keep a history of what I am looking on the Internet when I use Firefox. I have not been able to set this parameter on the Firefox app. Please notify.

    I use Firefox on my laptop and the history records, but on the app smart phone is recorded history, and I don't want that.

    Thank you!

    Firefox stores history of form field and history of research together and you can disappear together or disable the two together.

    (1) erase

    Use the menu for your platform (hardware menu button or the button menu 3-stacked-points on the address bar)

    Settings > privacy > Clear Private Data

    Check the ones you want to delete and deselect those that you want to save.

    (2) turning off the feature of pre-filling

    There is no dialog box to do this, you will need to do a bit of work under the covers using the subject: configuration preferences editor.

    In the Awesomebar, type or paste Subject: config and press the Go arrow. You can bookmark this page if you like tinkering with settings.

    In the search box, type form and make a pause while Firefox filters the list to display the preferences containing the form.

    Type browser.formfill.enable to select this option and the Word switches must appear. Press to switch the value from true to false.

    Which should prevent form data and saved searches in the future. However, results of search always pages will appear in your story.

    Success?

  • How to make a private folder in xp

    the drop-down list of the sharing folder doesn't let me make a folder crearion

    HOW to: Set the My Documents folder as "private" in Windows XP - http://support.microsoft.com/kb/298399
    http://www.microsoft.com/learning/books/homeandofficeuser/tips/040402.asp - how to make My Documents private in XP Home

    You can make My Documents private in XP Home. Since you don't mention what version of XP you are using, your end goal is, if it is a home or work computer, etc. I can only give you the following background information. If you are in need of more detail, thanks for posting back with missing details about your situation.

    XP does not use passwords to protect resources. NT operating systems use the permissions. Here's the information to help you with that:

    How to disable Simple Sharing and set permissions on a folder shared in Windows XP (Pro only)
    http://support.Microsoft.com/?kbid=307874

    How to configure file sharing in Windows XP (includes information about permissions):
    http://support.Microsoft.com/kb/304040

    By default in XP Home you can only files and folders under My Documents "private". Otherwise, to display the Security tab in Windows XP Home, restart in safe mode and log on with an account that has administrator privileges. Go in Safe Mode, press the F8 key as the computer starts. That you will get the menu where you can choose Safe Mode.

    Note that the file system must be NTFS, FAT32 not.

    Passwording of folders is not possible unless you their zip. When you do (right click on a folder, then "send to > compressed folder") and then open the zip file, you will find an option under file > "add a password." Otherwise, use a third-party software. Google "password protect folders".

    MS - MVP - Elephant Boy computers - don't panic!

  • How to make a private folder

    I want to make a folder on my c, private drive so that I can access it - how can I do this?

    XP does not use passwords to protect resources. NT operating systems use the permissions. Here's the information to help you with that:

    How to disable Simple Sharing and set permissions on a folder shared in Windows XP (Pro only)
    http://support.Microsoft.com/?kbid=307874

    How to configure file sharing in Windows XP (includes information about permissions):
    http://support.Microsoft.com/kb/304040

    By default in XP Home you can only files and folders under My Documents "private". Otherwise, to display the Security tab in Windows XP Home, restart in safe mode and log on with an account that has administrator privileges. Go in Safe Mode, press the F8 key as the computer starts. That you will get the menu where you can choose Safe Mode.

    Note that the file system must be NTFS, FAT32 not.

    Passwording of folders is not possible unless you their zip. When you do (right click on a folder, then "send to > compressed folder") and then open the zip file, you will find an option under file > "add a password." Otherwise, use a third-party software. Google "password protect folders".
    MS - MVP - Elephant Boy computers - don't panic!

  • Private Function

    I want a private in my app.cpp function. I don't want to declare in the header file, is there a way to do this?

    So far, I've had, but it does not work:

    App::App()
    {
    
        setMenu();
    
    }
    
    void setMenu()
    {
    
    }
    

    The definition of your method must have a namespace.

    void::setupPages() {} App

    }

  • Make your own functions

    Hi, I want to create some sort of library, I mean, I want to create a list of vi that can be loaded in the palette of functions.

    I've seen the LLB container but seems this isn't what I want.

    Any ideas what am I looking for?

    Have you read the link on the use of VIPM (VI Package Manager) of the page on the creating a palette? It offers an easy way to install a new palette.

  • How to make a generic function?

    Hi all

    I am using oracle 11g.

    My question is how can I do a generic function to escape some special charecters.

    Currently, I use this way.

    Select Replace (replace (replace (FACILITY_ADDRESS,'-','-'), "','------" '),'"','------"') installation;

    above, I give for a column, in the same way, I do for some more columns

    so I need a generic function, and I'll use this function in each columns that depends on the State.

    Thank you

    Dale

    search for deterministic function?

    create or replace function repl (p varchar2) return varchar2 deterministic as

    Start

    return replace (replace (replace (p, '-','-'), "',' \" ') ', ' "' ','------" ');

    end;

    ----

    Ramin Hashimzade

  • Make website private, so it does not appear in search results

    How can I make sure that my site does not appear in search engines?

    Your best bet would be to password - protect. There are also ways to ensure that this will not be displayed on Google. You'll have to forgive me, usually people ask exactly in front of the issue.
    Check out this article: block URLs by password - protect your server - webmaster help directories

    Block the search indexing with meta - webmaster help tags

    If my answer helped you or makes you in the right direction, please mark it as either the right answer or a useful answer, respectively. Thank you kindly!

  • How to make a simple function on the liberation of a mouse AS3.0?

    so its been a while that I was Flash Professional and I'll have to re - educate myself in almost everything. what I want to do is to create a simple function of the liberation of a mouse click vs what is the command to access freedom I know the click is MouseEvent.CLICK, function, but what is the command to access release on?

    You probably want to use MouseEvent.MOUSE_UP (which is what happens to define the end of a CLICK event)

  • Make a script function as one action, rather than a lot

    Basically I have a loop that change all paragraph and character styles in a document for a given language.


    As such, however, whenever someone is running, if you have to cancel you must hold the key ctrl + z for awhile. I would rather if it ran a little cleaner in this regard.

    Here is the script, please let me know what I need to wrap it in to do this. Also, I'm on cs4, but I would like it to be scalable for cs3 and cs5, as currently it is already. All the best

    / c

    function arabic()
    {
    var myStyles = app.activeDocument.allParagraphStyles;
    var myChStyles = app.activeDocument.allCharacterStyles;
    Paragraph styles
    for (oneStyle = 1; oneStyle < myStyles.length; ++ oneStyle)
    {
    .appliedLanguage myStyles [oneStyle] = "Arabic";
    .ligatures myStyles [oneStyle] = true;
    .hyphenation myStyles [oneStyle] = true;
    myStyles [oneStyle] .kerningMethod = "settings";
    myStyles [oneStyle] .justification = 1919578996;
    myStyles [oneStyle] .paragraphDirection = 1379028068;
    myStyles [oneStyle] .paragraphJustification = 1886023265;
    myStyles [oneStyle] .digitsType = 1684629609;
    myStyles [oneStyle] .characterDirection = 1379028068;
    composer of myStyles [oneStyle] = "Adobe world-ready paragraph composer";
    Pointsize, basic model
    var myPoint is myStyles [oneStyle] .pointSize;.
    myStyles [oneStyle] .pointSize = myPoint + 3;
    Foreground, the basic model
    myLead var is myStyles [oneStyle] .leading;.
    If (myStyles [oneStyle] .leading == 1635019116) {}
    myStyles [oneStyle] = 1635019116 ;} .leading
    Another myStyles [oneStyle] .leading is myLead + 3;.
    FONTS CONDITIONAL STATEMENTS
    Garamond Pro
    If (. appliedFont.fontFamily myStyles [oneStyle] == "Adobe Garamond Pro") {}
    .appliedFont myStyles [oneStyle] = "traditional Arabic";
    If (.fontStyle myStyles [oneStyle] == "Novel") {}
    myStyles [oneStyle] .fontStyle = "Regular" ;}
    ElseIf (myStyles [oneStyle] .fontStyle = "Italic") {}
    .fontStyle myStyles [oneStyle] = "Regular";
    .skew myStyles [oneStyle] = - 15 ;}
    ElseIf (myStyles [oneStyle] .fontStyle = "Semibold") {}
    myStyles [oneStyle] .fontStyle = "Bold" ;}
    ElseIf (myStyles [oneStyle] .fontStyle = "Semibold Italic") {}
    .fontStyle myStyles [oneStyle] = 'bold ';
    .skew myStyles [oneStyle] = - 15 ;}
    ElseIf (myStyles [oneStyle] .fontStyle == "" BOLD"") {}
    myStyles [oneStyle] .fontStyle = "Bold" ;}
    ElseIf (myStyles [oneStyle] .fontStyle == "Bold Italic") {}
    .fontStyle myStyles [oneStyle] = 'bold ';
    .skew myStyles [oneStyle] = - 15 ;}}
    Minion Pro
    ElseIf (. appliedFont.fontFamily myStyles [oneStyle] == "Minion Pro") {}
    .appliedFont myStyles [oneStyle] = "traditional Arabic";
    If (.fontStyle myStyles [oneStyle] == 'Ordinary') {}
    myStyles [oneStyle] .fontStyle = "Regular" ;}
    ElseIf (myStyles [oneStyle] .fontStyle = "Italic") {}
    .fontStyle myStyles [oneStyle] = "Regular";
    .skew myStyles [oneStyle] = - 15 ;}
    ElseIf (myStyles [oneStyle] .fontStyle = "Semibold") {}
    myStyles [oneStyle] .fontStyle = "Bold" ;}
    ElseIf (myStyles [oneStyle] .fontStyle = "Semibold Italic") {}
    .fontStyle myStyles [oneStyle] = 'bold ';
    .skew myStyles [oneStyle] = - 15 ;}
    ElseIf (myStyles [oneStyle] .fontStyle == "" BOLD"") {}
    myStyles [oneStyle] .fontStyle = "Bold" ;}
    ElseIf (myStyles [oneStyle] .fontStyle == "Bold Italic") {}
    .fontStyle myStyles [oneStyle] = 'bold ';
    .skew myStyles [oneStyle] = - 15 ;}}
    Myriad Pro
    ElseIf (. appliedFont.fontFamily myStyles [oneStyle] == 'Myriad Pro') {}
    .appliedFont myStyles [oneStyle] = "Yakut Linotype";
    If (.fontStyle myStyles [oneStyle] == 'Ordinary') {}
    myStyles [oneStyle] .fontStyle = "Light" ;}
    ElseIf (myStyles [oneStyle] .fontStyle = "Italic") {}
    .fontStyle myStyles [oneStyle] = "light";
    .skew myStyles [oneStyle] = - 15 ;}
    ElseIf (myStyles [oneStyle] .fontStyle = "Semibold") {}
    myStyles [oneStyle] .fontStyle = "Bold" ;}
    ElseIf (myStyles [oneStyle] .fontStyle = "Semibold Italic") {}
    myStyles [oneStyle] .fontStyle = "Bold" ;}
    ElseIf (myStyles [oneStyle] .fontStyle == "" BOLD"") {}
    myStyles [oneStyle] .fontStyle = "Bold" ;}
    ElseIf (myStyles [oneStyle] .fontStyle == "Bold Italic") {}
    .fontStyle myStyles [oneStyle] = 'bold ';
    .skew myStyles [oneStyle] = - 15 ;}}
    }
    Character styles
    for (unStyle = 1; unStyle < myChStyles.length; ++ unStyle)
    {
    myChStyles [unStyle] .appliedLanguage = 'Arabic ';
    If (myChStyles [unStyle] .fontStyle = "Italic") {}
    myChStyles [unStyle] .fontStyle = NothingEnum.nothing;
    myChStyles [unStyle] .skew = - 15 ;}
    }
    }
    Arabic();

    Hey!

    Change this:

    arabic();
    

    in this:

    app.doScript(arabic, undefined, undefined, UndoModes.ENTIRE_SCRIPT, "Apply Arabic Langauge");
    

    Hope that helps.

    --

    tomaxxi

    http://indisnip.WordPress.com/

  • Make a javascript function to detect the browser

    Hello people,
    I have discovered a bug, when I put the ownership of the area of the Panel 'type' to 'stretch' on firefox that the Panel simply disappears.
    This property works on IE8, but we don't need on firefox because firefox automatically stretch the components...

    Is it possible to do any type of function(javascript or not) to detect the browser wrether the user uses and set this property on on / off?

    Thanks in advance.

    Hello

    This can help you to solve your problem:

    #{requestContext.agent.agentName}
    

    / Onur

  • -How to make 'save &amp; print' function work? -silverlight on mac

    I have a mac, 10.9.4. I use silverlight with browser safari 7.0.6. Everything works fine. I can not just save and print.

    Does anyone have any suggestions?

    concerning

    Hello Smittychat,

    I am now using firefoxbrowser. Saving and printing works very well.

    I enjoyed your frequency

    concerning

Maybe you are looking for