Attempting to test Function with Bind Variable --- What am I doing wrong?

When I try to test a function (ComputeFreight) with a bind variable, I get an error, returned.....
"SQL> EXEC :ComputeFreight :=V_ComputeFreight;
BEGIN :ComputeFreight :=V_ComputeFreight; END;
ERROR at line 1:
ORA-06550: line 1, column 25:
PLS-00201: identifier 'V_COMPUTEFREIGHT' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored"
What am I doing wrong?
Below is my code with description ----
create or replace function "ComputeFreight"(p_ORDERNUMBER IN C_ORDER.ORDERNUMBER%TYPE) -- Passing Ordernumber into Function
return NUMBER
is
-- Declaring Variables
v_ComputeFreight NUMBER(10,2);
v_low number (10,2) := 0.05;
v_high number (10,2) := 0.07;
v_SUBTOTAL NUMBER(10,2);
begin
-- Computing order subtotal (Retrieving Item cost and qty from two different tables, multiplying and adding total order cost)
SELECT SUM(O.QUANTITY * I.ITEMPRICE) INTO v_subtotal
FROM ORDER_LINE O JOIN INV_ITEM I
     ON (O.ITEMNUMBER = I.ITEMNUMBER)
WHERE O.ORDERNUMBER = P_ORDERNUMBER;
-- Testing to see which freight charge rate to use
IF
v_subtotal < 300.00 THEN
v_computefreight := v_subtotal * v_low;
ELSE
v_computefreight := v_subtotal * v_high;
END IF;
-- Returning Freight Charge
RETURN v_ComputeFreight;
end "ComputeFreight";
-----------------------------------

You have made at least 2 errors.
The first one is the name of your function:
create or replace function "ComputeFreight" (You use double quotas and the mixed case in the function name - it means you
make your function name case-sensitive. In the call of your function you have to use double-quoted form "ComputeFreight", nothing else.
If you your function name has to be case-insensitive, don't use double quotas or
use upper-case form: "COMPUTEFREIGHT".
The next mistake is how your call you function. You have to do the following:
var V_ComputeFreight number
EXEC :V_ComputeFreight := <your function name>
V_ComputeFreight is a bind variable and you have to read more about this.
Rgds.
P.S. and as Dave fairly remarked above you have to pass the argument into the function.
Message was edited by:
dnikiforov

Similar Messages

  • Message "this app is not compatible with this iPad" What am I doing wrong?

    I am trying to update my apps and when I touch update all I get the message 'this app is ot compatible with this I-pad.  this has never happened before, what am I doing wrong?

    One or more of the apps you are updating is seeing that you have not yet gone to ios5.  All the iwork app changes, for example, will not upgrade until you do.   What you can do is tick them individually.  If that particular app will update, then it will.  If it won't it will tell you, and you can go back and get them later after you do the ious 5 update.  Last night i decided to update before i started the ios 5 upgrade, and there were 16 apps waiting for up date.  All but 5 did update, but not the i works, and 2 others.
    It takes a little longer to do them 1 at a time, but it is better than staring at the stupid 'not eligable' notice.

  • HT204053 Trying to set up my apple TV and it doesn't want to accept the Apple ID and password I have just set up with iTunes.  What am I doing wrong?

    I am having trouble signing into my apple ID acct on my new device Apple TV.  It doesn't seem to accept my newly created  Apple ID and password.  What am I doing wrong?  Is there a delay in creating the acct to when I can use it?

    yeah have reguested apple id and reset password still nothing

  • Using pipelined functions with bind variables in Apex...

    Hy all:
    I have a table which has about 10 million records and it is hanging up the system when it is trying to retrieve the data from that table... so what I have done is I created a pripelined
    function and then trying to retrieve data using an SQL statement ... when I try to use a bind variable to filter by the date and location it is binding according to the location
    but not by date ... can anyone help me in this please!!
    Help greatly appreciated !
    Thanks in advance !

    Hi Denes:
    Create or replace type ohe1 as object (
    IMLITM NCHAR(50), IMAITM NCHAR(50), IMDSC1 NCHAR(60), COUNCS NUMBER(22), LIPQOH NUMBER(22),
    LIMCU NCHAR(24), LILOCN NCHAR(40), LILOTN NCHAR(60), LILOTS NCHAR(2), IOMMEJ NUMBER(22))
    CREATE OR REPLACE TYPE OHE AS TABLE OF Ohe1
    CREATE OR REPLACE FUNCTION GET_ohe
    return OHE PIPELINED
    IS
    m_rec ohe1:= ohe1 (NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,0);
    begin
    for c in (select f1.LITM LITM, F1.AITM AITM, F1.DSC1 DSC1, F5.UNCS UNCS,
    F21.QOH QOH, F21.MCU MCU, F21.LOCN LOCN, F21.LOTN LOTN, F21.LOTS LOTS,
    F8.MEJ MEJ FROM F1 F1, F2 F2, F21 F21, F5 F5, F8 F8
    WHERE (F5.EDG='07') AND (F21.QOH != 0) AND F2.IBITM = F1.IMITM
    AND F21.ITM = F2.ITM AND F21.ITM = F5.ITM AND F21.MCU = F5.MCU
    AND F21.MCU = F2.MCU AND F21.LOTN = F8.LOTN AND F21.MCU = F8.MCU)
    loop
    m_rec.LITM:=c.LITM;
    m_rec.AITM:=c.AITM;
    m_rec.DSC1:=c.DSC1;
    m_rec.UNCS:=c.UNCS;
    my_record.QOH:=c.QOH;
    my_record.MCU:=c.MCU;
    my_record.LOCN:=c.LOCN;
    my_record.LOTN:=c.LOTN;
    my_record.LOTS:=c.LOTS;
    my_record.MEJ:=c.MEJ;
    PIPE ROW (my_record);
    end loop;
    return;
    end;
    select LITM , AITM , DSC1 , UNCS*.0001 UNCS, QOH*.0001 QOH, (UNCS*.0001)*(QOH*.0001) AMOUNT,
    MCU MCU, LOCN LOCN, LOTN LOTN, LOTS LOTS, jdate(DECODE(MEJ,0,100001,MEJ)) MEJ FROM
    TABLE (GET_ohe)
    WHERE trim(LIMCU)= TRIM(:OHE_BRANCHID)
    AND (jdate(DECODE(MEJ,0,10001,MEJ)) >=:FROMEXPDT
    AND jdate(DECODE(MEJ,0,10001,MEJ)) <=:TOEXPDATE)
    The MEJ is a julian date and I am trying to convert it into a date ..... using the function jdate! and the pipelined function is created without any errors
    and I am able to get the data with correct branch location bind variable but only problem is it is not binding the date filters in the sql.....
    Thanks
    Edited by: user10183758 on Oct 16, 2008 8:17 AM

  • Help with a script (what am I doing wrong)

    tell application "Finder"
    set theFolder to (choose folder with prompt "choose the user folder") as Unicode text
    set newFolder to make new folder at theFolder as Unicode text with properties {name:"test folder"}
    set targetFolder to newFolder
    move entire contents of (theFolder & "Library:Preferences") to targetFolder
    end tell
    error "Can’t get entire contents of \"Macintosh HD:Users:username:Library:Preferences\"." number -1728 from «class ects» of "Macintosh HD:Users:username:Library:Preferences"
    also I would like the new folder in Library not user folder

    I had some time to give the connected volume stuff another look, so I tweaked the script a little. This latest version will handle getting the users from local or connected volumes as well as connected accounts. I threw in some labels in the choice dialog so you can see what the volumes are, and changed the time stamp a little to avoid using either the POSIX or Finder path delimiters.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #DAFFB6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    -- remove user preferences to a backup folder
    set theUsers to {}
    repeat with aDisk in (get list disks)
    set aDisk to contents of aDisk
    tell application "System Events"
    if (local volume of disk aDisk) then -- get users from local disks
    if (startup of disk aDisk) then
    set label to "[Startup Volume] "
    else
    set label to "[Local Volume] "
    end if
    repeat with aUser in paragraphs of (do shell script "ls '/Volumes/" & aDisk & "/Users'")
    if aUser is not in {"Shared"} then set the end of theUsers to (label & aDisk & "/Users/" & aUser)
    end repeat
    end if
    try
    if (server of disk aDisk is not missing value) then -- get users from connected disks
    try
    repeat with aUser in paragraphs of (do shell script "ls '/Volumes/" & aDisk & "/Users'")
    if aUser is not in {"Shared"} then set the end of theUsers to ("[Server Volume] " & aDisk & "/Users/" & aUser)
    end repeat
    on error errmess -- get connected user
    log errmess
    set the end of theUsers to ("[Server " & (server of disk aDisk) & "] " & aDisk)
    end try
    end if
    end try
    end tell
    end repeat
    set theChoice to (choose from list theUsers with title "Move preferences to backup" with prompt "Select an account to move user preferences:" with empty selection allowed) as text
    if the result is in {"false", ""} then return -- no selection
    set theChoice to "/Volumes/" & text ((offset of "] " in theChoice) + 2) thru -1 of theChoice -- strip off the volume labels
    set theSource to (theChoice & "/Library/Preferences") as POSIX file as text as alias
    set theDestination to (theChoice & "/Library") as POSIX file as text as alias
    tell ((current date) as «class isot» as string) to set timeStamp to (text 6 thru 7) & "-" & (text 9 thru 10) & "-" & (text 3 thru 4) & space & (text 12 thru 13) & (text 15 thru 16) -- ISO time = yyyy-MM-ddThh:mm:ss
    set theName to "Preferences copy " & timeStamp
    try
    set targetFolder to ((theDestination as text) & theName) as alias
    on error errmess
    log errmess
    tell application "Finder" to make new folder at theDestination with properties {name:theName}
    set targetFolder to the result as alias
    end try
    tell application "Finder" to move items of theSource to targetFolder
    </pre>

  • Passing url variable - what am I doing wrong?

    I've made a form and am attaching the code.
    Basically I am trying to get a list of offices and select one
    (which I am able to do when I publish and run the webpage/form).
    However, it always passes the value of "1" (the first record)
    to the next page (no matter what office I select from the drop down
    menu). I've tried the other choices under the lightning bolt, but
    those won't pass anything to the next page.
    Help!

    Why are you passing OfficeID as an URL variable in the form
    action when it is already a FORM variable (the SELECT form field)?
    The selected OfficeID will be passed to test2.cfm in the FORM
    scope.
    Also, you have named the submit button OfficeID, too. Form
    field names need to be unique, except possibly radio buttons and
    checkboxes.

  • Photos from Win XP will not Sync with 3G iphone what am I doing wrong

    Need some help, just got the iphone and the only thing I can't understand is how to transfer my photos from my PC to the phone. I understand I use Itunes and point it to the folder/photo I want to sync. Itunes goes through it optimizing 1 of 29 photos (only doing 29 photos to start) but then when I go to the phone I have the normal Camera Roll Album and one folder listed. In the folder listed is only one photo which is all messed up.
    I understand the phone takes photos and displays photos at one res, and I thought Itunes doesn't care what res the photo from the PC is cause it optimizes it to be viewed on the phone.
    What am I missing ? and what is this folder that keeps being built ipod photo cache. Any help would be wonderful and yes I did read the "Iphone User Guide" that came with the phone.

    Not sure what the issue is that you are having. Sounds like you are doing the right thing.
    You point iTunes to a folder that contains pictures (or more subfolders that contain pictues...1 subfolder deep). Then tell it to sync. iTunes does its "optimize" thing. Then they sync over. Each subfolder in that folder you pointed to becomes a library.
    eg:
    C:\PHOTOS you point it to.
    C:\PHOTOS\FAMILY
    C:\PHOTOS\WORK
    C:\PHOTOS\FRIENDS
    C:\PHOTOS\WALLPAPER
    C:\PHOTOS\MISC
    are all under it.
    Each of those becomes a library on the iPHone (Family, Work, friends, etc)
    Photos from those folders go to phone (and photos from the root you pointed it to).
    The extra folder it makes (think it tries to mark it hidden unless you have it set to show hidden files) is just stuff for iTunes to keep track (like HASH data and other stuff) to know what it has synced so it can tell what is new and what is old if you add more photos or folders later.
    I have some huge images on my PC that I sync over without issue. iTunes scales them down when syncing to the phone (the whole optimize stuff).
    Message was edited by: DaVBMan

  • Cannot set up Mail with GoDaddy Account, what am I doing wrong?I

    I searched the correct way to do this through GoDaddy, my hosting service and got these directions, which I have tried, but didn't work.
    *To Set Up Apple Mail for SMTP Relay
    1. From the Mail menu, click Preferences.
    2. In the Preferences window, click Accounts.
    3. In the Account window, click Account Information.
    4. From the Account Type list, select POP.
    5. In the Description field, type a name for the account.
    6. In the Email Address field, type your email address.
    7. In the Your Name field, type your full name.
    8. In the Incoming Mail Server field, type pop.secureserver.net.
    9. In the User Name field, type your user name (your full email address).
    10. In the Password field, type the password to your email account.
    11. In the Outgoing Mail Server (SMTP) field, type smtpout.secureserver.net.
    12. In the SMTP Server Options window, in the Outgoing Mail Server field, type smtpout.secureserver.net.
    13. In the Authentication field, type your password.
    14. In the Server Port field, type 80 or 3535.
    15. In the User Name field, type your SMTP user name.
    16. In the Password field, type your SMTP password.
    17. Click OK.
    Obviously, I'm connected to the internet...
    I tried doing this through POP and IMAP, there is an error message saying unable to connect. What can be done to make this work?

    the 3535 is not gonna work...the 110 will work...I have been dealing w/ godaddy.com .mac and mac support for 5 months with compatibility. It is the worst.. mac says they never heard of godaddy and godaddy had me run a trace route so then I had to deal w/ my isp for no good reason since other browsers could reach godaddy so it is not my stream.. It is the worst. These are suposed to be the easiest and most seemless systems and they cannot sync. I use firefox to get to go daddy on my macbook and it is as if I am using dial up. I am ready to just cancel .mac which is really another headache to learn..and godaddy and just move everything over to a company that can handle everything. My web business has been on hold since January. It makes no sense. I got the mac so I would not have to deal w/ the windows registry error answer.. now godaddy tells me they are built for windows.
    There is no winning at this. I have spent countless hours on phone support after spending countless hours researching the answers only for all support lines to tell me i can "go to...website for more info..." it is as bad as using windows.
    Very dissatissfied,
    p

  • Replacement Ipod Dead With Same Problems, what am i doing wrong?

    I bought a Classic, it started to not play some of my songs, then it crashed, then i couldnt revive it or put anything on it, so i sent it back and received a new one promptly. Guess what, same problems, stopped playing some songs about a week ago, HDD makes strange sounds as if trying and failing to locate tracks, then i did a restore after i reworked my itunes library and now the pc is starting to not recognize it and cant add songs and restoring is a pointless option, ipod is full of songs up to the letter G after a failed library sync. PlEASE help me remedy so that i dont have to replace my replacement with another ipod that needs to be replaced

    Ok here's what I did:  While the modem was still connected to my PC, my router was plugged in and just had power so I did the hard reset like you said.  Then I plugged the modem into the router, reset my modem and plugged the ethernet cable back into my tower and Now it works.  The only problem is that I have is that when i get to http://198.162.1.1/ and leave username blank and password admin, I keep getting 401 Unauthorized.  I would really like to be on a secured network but I never could because the easylink advisor wouldn't work right and I couldn't get the laptop to get connected.  Thank you for your help.

  • Some websites do not display properly. I am getting overlapping of menu's. This does not happen with IE. What am I doing wrong?

    I log on to the same wesite on Mozilla and IE. On mozilla the left hand menu overlaps one over the other but the same does not occur with IE, I ask this as I prefer mozilla. Do I need to change any configuration setting. I have a Dell Studio Laptop which is only about 5 months old. Unfortunately I cant post the url because it needs a password to get into the site.

    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)<br />
    See http://kb.mozillazine.org/Zoom_text_of_web_pages
    If you increased the minimum font size then try the default setting 'none' as a high value can cause issues like you described.
    * Tools > Options > Content : Fonts & Colors > Advanced > Minimum Font Size (none)
    * Tools > Options > Content : Fonts & Colors > Advanced > [X] "Allow pages to choose their own fonts, instead of my selections above"
    See also [[Websites look wrong]

  • HT1414 My generation 1 iPad won't update even when I try manually with iTunes.  What am I doing wrong?

    So I have tried updating in settings and iTunes and nothing any suggestions?

    If you have the 1st gen iPad you cannot update via the settings unless you have iOS 5 on it and that is as high as you can go anyway - actually 5.1.1 is the limit.

  • Trouble with  vst pluggin, what  am i doing wrong??

    trying to place vst plugs , i added to the folder , but nothing??? anyone can set me in right direaction , im clearly doing something wrong

    ...additionally...
    Many VSTs are available as AUs.
    Another tip:wrappers exist. Wrappers allow most of your VSTs to load as AUs-use AUs if they are available.
    Find a wrapper here:
    http://www.fxpansion.com/product-auadapter-main.php

  • I am trying to download firefox to my android and get this meesage" there are no android phones associated with this account " what am I doing wrong?

    I would like to sync my laptop and android but get the above message

    To install Firefox from the Android Market web site, you must be logged in to the web site and your phone using the same Google account. If that doesn't work, you can follow the instructions here for other ways to install Firefox for Android: https://wiki.mozilla.org/Mobile/Platforms/Android

  • Using my apple ID and password on Mobile Me, I get the message  "Verification Failed"  .  Could not communicate with the server.  What am I doing wrong?

    Using my Apple ID and password on Mobile Me, I get the message "Verification Failed".  Could not communicate with the server"  What am I doing wrong?

    There is a MobileMe forum.  You might have better luck their.

  • I am using Firefox 3.6.13 and have installed Windows Media Player 1.0.0.8 for Firefox. However, if I attempt to open a file with a .wmv extension it appears to function properly, except, that I cannot "play" the file. What am I doing wrong?

    # Question
    I am using Firefox 3.6.13 and have installed Windows Media Player 1.0.0.8 for Firefox. However, if I attempt to open a file with a .wmv extension it appears to function properly, except, that I cannot "play" the file. What am I doing wrong?

    You probably have not seen anyone reporting the exact same problem as you. All three crash reports have the same crash signature and as currently ranked 67 it is not the commonest of reasons for a crash.
    I hope you enter your email contact information when reporting crashes. I note you see this crash when using videos, others may possibly see this crash in other circumstances.
    You have already tried the obvious, attempts at a fix so it is now down to wait and see, maybe developers working on the bug will report something or fix it.
    Did you try my suggestion of installing portable ESR ?
    For forum cross referencing purposes
    * Crash Reports for Crash IDs <br />bp-71697f5d-41d4-48ae-9db9-3e6302130607<br /> bp-6e1347bc-153f-433a-9c35-a5f022130607<br /> bp-92a533a2-9e09-4c1e-8df7-deb4c2130607
    *(all three) Crash Signature: EnumSoftwareMFTs(_GUID const&, unsigned int, __MIDL___MIDL_itf_mfobjects_0000_0006_0003 const*, __MIDL___MIDL_itf_mfobjects_0000_0006_0003 const*, IMFActivate***, unsigned int*)
    * Related bug 858667 NEW crash in mozilla::wmf::MFTEnumEx @ EnumSoftwareMFTs
    *I note this was first seen in Fx21 and is 100% Windows 7
    <br />

Maybe you are looking for

  • Cisco 871 to Cisco ASA 5545 Site-to-Site VPN Split Tunnel not working.

    Tunnel comes up and can see and access protected traffic but cannot access web (Split Tunnel). Don't know if access problem or route issue. Listed below is configuration for Cisco 871, any help very much appreciated. crypto isakmp policy 1  encr 3des

  • Server created print ques printing directly to the printer

    I'm trying to enforce quotas as well as push out a global set of printers (i.e. not setup locally) I can do this no problem, but my managed macs always print directly to the printer, not via my server. I'm installing the printers locally on my server

  • Disable automatic deletion of bindings in pageDef

    When I delete a component on a .jsff og .jspx page, the binding in the pageDef file is automatically deleted if no other component on the page points to the binding. Is it possible to disable this behavior? A lot of our variables are used in beans, a

  • Spry Accordion how to open on load panels closed

    I'm having problems with spry accordion on load panels closed. I tried putting the changing the var in the javascript usedFixedPanelHeight: false:, and that didn't work. The box would come up saying that this javascript will not work for this accordi

  • Compatibility with Creative Live Ultra (notebooks)

    I run a HP Pavilion ze2000, will I be able to use the Creative Live Ultra without problems like on the TOshiba Sattelite notebooks? I have usb 2 port and I surpase/meet all recommended requirements.