Is It Possible To define a size of the Procedure Parametere?

In Oracle Is It Possible To define a size of the Procedure Parametere?
If i have the procedure like
Test_sp(no int,name varchar2)
Is it possible to define a size
Test_sp(no int(5),name varchar2(255))
Thanks
Rangan S

As Anthony said - no, not in the parameter signature of a procedure or a function. Which could have unexpected run-time errors as one could wrongly assume that using a "derived" type will allow this.
The following example illustrates:
SQL> create table datatype(
2 varchar2_5 varchar2(5),
3 number1 number(1)
4 );
Table created.
SQL>
SQL>
SQL> create or replace procedure fooProc( s datatype.varchar2_5%TYPE, n datatype.number1%TYPE ) is
2 s1 datatype.varchar2_5%TYPE;
3 n1 datatype.number1%TYPE;
4 begin
5 begin
6 DBMS_OUTPUT.put_line( 'len='||length(s)||' value='||s );
7 DBMS_OUTPUT.put_line( 'value='||to_char(n) );
8 exception when OTHERS then
9 DBMS_OUTPUT.put_line( 'parameter display failed with error '||SQLERRM(SQLCODE) );
10 end;
11
12 begin
13 s1 := s;
14 DBMS_OUTPUT.put_line( 'string parameter assignment succeeded' );
15 exception when OTHERS then
16 DBMS_OUTPUT.put_line( 'string assignment failed with error '||SQLERRM(SQLCODE) );
17 end;
18
19 begin
20 n1 := n;
21 DBMS_OUTPUT.put_line( 'number parameter assignment succeeded' );
22 exception when OTHERS then
23 DBMS_OUTPUT.put_line( 'number assighment failed with error '||SQLERRM(SQLCODE) );
24 end;
25 end;
26 /
Procedure created.
SQL>
SQL> exec fooProc( 'test1', 1 );
len=5 value=test1
value=1
string parameter assignment succeeded
number parameter assignment succeeded
PL/SQL procedure successfully completed.
SQL>
SQL> exec fooProc( 'this should fail', 1 );
len=16 value=this should fail
value=1
string assignment failed with error ORA-06502: PL/SQL: numeric or value error: character string buffer too small
number parameter assignment succeeded
PL/SQL procedure successfully completed.
SQL>
SQL> exec fooProc( 'test', 1234 );
len=4 value=test
value=1234
string parameter assignment succeeded
number parameter assignment succeeded
PL/SQL procedure successfully completed.
SQL>
Note that only the string assignment fails. The string parameter works fine. And there is no impact at all on the number side, despite seemingly constraining it to a single digit.

Similar Messages

  • Is it possible to define a function in the MathScript Node

    Is it possible to define a function in the MathScript Node

    You can not define a function inside of a MathScript Node, but only because it isn't necessary. The way custom functions work in MathScript is that they are saved in .m files located in paths in the MathScript path list. When the MathScript compiler receives a function that it doesn't recognize, then it searches for it in the path list, and upon finding it, compiles and loads the function. You can specify these search paths manually by going to File>>MathScript Preferences from the MathScript Window or dynamically by using the path() command within a script.
    To answer your original question, if you would like to create custom functions dynamically within a VI, then you can simply build your custom functions using strings and then save them to an ASCII file with the extension .m. You could either save the file to a path already in the MathScript path list or you could dynamically specify the path by passing the path into a MathScript Node as a string and by using the path() command at the beginning of your script to set it.
    Kind Regards,
    E. Sulzer
    Applications Engineer
    National Instruments

  • What is the purpose of Defining a requirement in the procedure?

    Hi
    I have a query related to the Output type .
    What is the purpose of Defining a requirement in the procedure?
    And where shall we code for a new requirement and also what shall we code in it?
    Thanks

    <b>Requirement Use</b>
    If the requirement is fulfilled (SY-SUBRC = 0), then output determination also takes into consideration output type or the access sequence, for which the requirement has been specified.
    <u><b>Output determination:</b></u>
    An object that checks whether the application data (for example, data determined in Customizing) corresponds to the condition records.
    If this is the case, one or several messages are "found," which can then be processed (for example, sent electronically).
    The condition records are searched for according to a predefined hierarchy in message determination.
    After defining a new requirement no say 604 for billing pricing procedure and activating it, the standard sap system creates a routine with the no: 604 specifically for billing. So the name of the program automatically created by SAP will have the naming convention something like RV64A604. then you need an access key to go to the change mode for writing any logic. Then just put a break-point and then execute VF01 or VF04, then the cursor position directly goes into this routine, where the pricing structures KOMK and KOMP have the visibility. So based on the values flowing inside this structures, you can probably code that suites the business requirements.
    there are some useful transactions like VOFM for maintaining the requirements and formulaes for a pricing procedure.
    For viewing the requirements in the procedure you can also go to V/08 transaction.
    Lakshminarayanan
    P.S. Reward points for all helpful answers.

  • Is ist possible to define heap size when start with java -jar

    Hi,
    I start my application as executable jar. How can I set the heapsize when double clicking myapp.jar ? With java -Xmx512m -jar myapp.jar it should go. But can I specify this when double clicking the myapp.jar ?
    Thanks
    Oli

    For all jars it is not acceptable I think.... the value as entry in the manifest.mf could be nice... :(

  • How do you add a user defined page size for a "standard" user

    I have been trying to add a User Defined Page size in the Adobe PDF Properties with a "Standard" AD account.  When I click add/modify, no error shows up on the screen but the page size does not show up in the drop down menu.  The only accounts that can add page sizes are "Admin" accounts, as far as I know.  Does anyone know a workaround?  PLEASE HELP!!!

    Firefox unable to store your password without username.
    *https://support.mozilla.org/en-US/kb/password-manager-remember-delete-change-passwords

  • Maximum size of a procedure

    Hi all..
    I am facing a probem with the debugging of a procedure.
    The size of the procedure is given below
    SOURCE_SIZE PARSED_SIZE CODE_SIZE ERROR_SIZE
    163624 1292 150380 0
    Is this size exceeding standard size.
    Also this Sp is calling many other SP,s.
    Is the problem with debugging related with the memory size..
    Pls advice
    thanks in advance..
    Simon

    What problems are you facing?
    What versions of SQLDeveloper and Oracle database are you using
    What operating system are you on?
    Why do you think it is related to size?

  • Is it possible to define xhtml:tabscript width by using %

    Thanks in advanced to everybody
    I am new in BSP developing. I have a page with two frames where one shows a menu and the other one shows a tabstrip which contents a frame where dynamically a URL is called.
    As far as I have seen it is not possible to define the width and the height of a tabscript by % only by px. I have checked out the forum and I have seen that other people have had the same problems on defining width and height on tabscripts.( see xhtmlb:tabStrip height attribute posted by Durairaj Athavan Raja on Jan 27). They solved it by fixing by hard the height.
    My problem is that the client wants to see as least scroll as possible.
    A solution would be to find an optimal fixed width and height but it seems to be difficult because the application is going to be run in different computers with different settings. Hence the better one would be to define the width and the height on running time, for example, as it is mentioned in the message, by javascript.
    So if I have the screen size on a javascript variable, is there any way to use that variable as the width or the height of my tabscript?. Does anyone know how can I define the width and the height of the tabscript in such a way that it seems like I am using %.
    Any idea is welcome.
    -- Oscar --

    Correct me if i havent understood your question correctly.
    you have a tabstrip and within the tabstripitem you have an iframe and and fill the iframe src based on the tab clicked. Right?
    If yes.
    There are three factors to the whole scene here with regard to hieght.
    1. page height
    2. tabstrip  height
    3. iframe height
    I have faced the similar issue and solved as follows.
    1. I had set the  <htmlb:page scrolling  to "NO" so that i dont get two scroll bars at the right side (one for page and the other for iframe)
    2. i have placed the iframe outside tabstrip
    3. put the tabstrip and the iframe into normal html table like below.
    <table height=100% border="0" cellpadding="0" cellspacing="0" width="100%">
                  <tr>
                    <td width="100%">
          <xhtmlb:tabStrip id                       = "TS1"
                           renderSingleTabAsHeading = "FALSE"
                           flowIndicatorVisible     = "FALSE"
                           width                    = "100%"
                           onSelect                 = "mySelect"
                           selection                = "<%= selected_tab %>"
                           viewStateMode            = "COLLAPSED_EXPANDED"
                           dropDownListVisible      = "TRUE" >
        </td>
          </tr>
          <tr>
            <td height=100% width="100%">
    <iframe  id="I1" name="I1" scrolling="yes" width="100%"  height="100%" src="<%= iframesrc %>"
           border="0" frameborder="0" >
    </td>
          </tr>
          </table>
    Hope this is clear.
    Regards
    Raja
    /people/mark.finnern/blog/2004/08/10/spread-the-love

  • Defining page size in XML Publisher

    Can we define page size using XML Publisher APIs.
    We have a problem where a single RTF template will be used for different countries and depending upon the country, the report needs to be printed on Letter or A4 or anything.
    I could find a parameter for Orientation but none for page size.
    Is there something we can do for defining page size or we need to rely on the printer setup.
    Regards,
    Satrajit

    to which column do u wnat to calculate goto that column
    <?add-page-total:variable_name;Column_name?>
    ex: <?add-page-total:inv;INVOICE_AMOUNT?>
    finally goto footer write
    <?show-page-total:inv;"999G990D00"?>

  • Is there a HP color laser printer that can define custom-size media sizes in WINDOWS?

    Is there a  HP color laser printer that can define custom-size media sizes in WINDOWS?

    Have you tried downloading and installing the drivers from here?
    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=18...
    //Click on Kudos and Accept as Solution if my reply was helpful and answered your question//
    I am an HP employee!!

  • Is it possible to open iPhoto twice under os-x lion to create a photobook on one desktop and to have a look to the photos in full size on the other desktop?

    Is it possible to open iPhoto twice under os-x lion, to create a photobook on one desktop and to have a look to the photos in full size on the other desktop?

    Ok let me ask you IF the IT department of your workplace does NOT want OS X installed on "THEIR" (The Companies) computers because of what they think is some type of security issue why are you trying to go against their wishes and install OS X on a computer that is NOT owned by you.
    That could cost you your job.
    If you continue down this path you will screw up the Windows install and have to take the system back to the IT department to get it fixed. What do you think they will say at that point?
    Do as you like but you would be better off just buying your own Mac computer if you are set on using OS X as your personal operating system.

  • Issues Defining Poster Size in Keynote 09

    I use Keynote to print posters of about 4x3 feet size. I used to be able to define and select a custom paper size in Keynote 08 in the page setup menu. When printing the file into a PDF to give it to our printers, this size was maintained, i.e. the poster printed directly from the PDF in the specified 4'x3' size.
    Now, in Keynote 09 it seems the page set-up menu is gone. On the print screen, the custom paper sizes I defined earlier appear grey shaded, and cannot be selected. It seems the only size-related variable that one can set in Keynote 09 are the number of horizontal and vertical pixels. Export to PDF seems to always end up in letter sized (or whatever pre-defined sizes can be selected in the print window). Does anyone have an idea how to print (or produce PDFs) with a defined size from Keynote 09? Thanks!

    After experimenting a bit, it seems that one can generate a PDF with a desired printing size by entering <dimension in inches>*72 into the 'poster size' field in the 'inspector'. Then using 'share' to export the file as PDF. This appears to preserve the size in the printed document (i.e. when printing on a letter size printer, one only gets a small fraction of the poster).

  • Possible to define color of screen BEHIND documents?

    I'm using Adobe Acrobat X Pro.
    Is it possible to define the background color of the documents when they open in Adobe Reader? I'm not talking about the document pages themselves, but rather that crappy grey and/or ugly blue screen that always displays behind the document pages.
    Can I define this for the user?
    Any suggestions?

    Can I define this for the user?
    No.

  • Is it possible to customize print sizes (8x8) when ordering prints from Apple?

    Is it possible to customize print sizes (8x8) when ordering prints from Apple?

    No.
    Here are the available sizes:
    http://www.apple.com/ilife/print-products.html#prints

  • Top Link 10.1.3 is it possible to define hierarchical queries in jdev

    Is it possible to define a hierarchical query in a named query in the mapping workbench (jdev 10.1.3) or we have to do it dynamically with the java api ?
    Any example is welcome.
    Best regards

    i didn't find the method that return the readallquery object i need from my named query
    i'm doing something wrong ?
    public class FlexTreeSetHierarchicalClause
      public static void setHierarchicalClause(oracle.toplink.descriptors.ClassDescriptor descriptor)
        // instantiante expression builder to build the expressions
        ExpressionBuilder expressionBuilder = new ExpressionBuilder();
        // Specifies a START WITH expression
        Expression startExpr = expressionBuilder.get("Flextree").get("flexitemI").equal(expressionBuilder.get("Flextreenode").get("flexitemparentI"));
        // Specifies a CONNECT BY expression
        Expression connectBy = expressionBuilder.get("Flextreenode").get("flexitemchildI").equal(expressionBuilder.get("Flextreenode").get("flexitemparentI"));
        //Specifies an ORDER SIBLINGS BY vector
        Vector order = new Vector();
        order.addElement(expressionBuilder.get("Flextreenode").get("flexitemchildI").get("flextext").get("label"));
        // get the readallobject to add the hierarchical clause
        DatabaseQuery dq = descriptor.getQueryManager().getQuery("getFlexTreeByName");
        ReadAllQuery raq = descriptor.getQueryManager().getReadAllQuery();
        // add the hierarchical clause
        raq.setHierarchicalQueryClause(startExpr, connectBy, order);

  • Possible to change icon size?

    Hi everybody. This is a long shot. Anyone know if its possible to increase the size of the icons in the bins? I know you can choose between small, medium and large icons. What I'm asking is if you can make the 'big' icons bigger -- big enough so that when selecting a photo you don't have to squint or load each one into the viewer.
    Thanks in advance for any advice.

    No, but you can zoom the screen by holding down the control key and using the mouse scroll up and down. That's not an FCP thing, it's a Mac thing.

Maybe you are looking for

  • Disconnection from mounted volume

    Hi there, I am accessing files on a colleague's G4 running OS 9.2.2 which acts as a file server (small office, no server as yet). I have a G4 running OS X 10.4.10. I go to My Network, select her computer, click on Connect, select her hard disk as the

  • Ajax submit failed: error =403, Forbidden why can't I sign in anymore?

    I just bought my HP 6700  I had setup an hpeprint account and now I receive this erro message(Ajax submit failed: error =403, Forbidden) I was trying to scan to my email [Personal Information Removed]   didn't work   so itried to my  HPE account   [P

  • Weird characters visualized by all webbrowsers

    Hi everybody, I have recently installed OSX 10.6.4 upgrading from Leopard. Installation was successfull but from that very moment on I have experienced problems in webpages' visualization: common characters such as letters or punctuation marks are of

  • Quiescing database leaves it hanging

    environment: Oracle 10g R2 running on a Windows Xp box. issuing alter system quiesce restricted leaves the system hanging until i have to eventually restart the database. in the meanwhile i cannot connect to the database not even as SYS until i event

  • Administrative vs Operational responsibilities

    <p> Hello, </p> <p> I have been working my way through the WebLogic Administrators course material. This is a course I have delivered a number of times in the past but this time I am compiling a list of questions for each module. </p> <p> In module 2