Basic Varray syntax

I wanted to create a VARRAY with a size_limit of 15 then initialize the VARRAY to 5 elements starting with 1. Can somebody tell me the exact syntax?

this?
SQL> ed
Wrote file afiedt.buf
  1  declare
  2     type var_ty is varray (15) of Number;
  3     v var_ty:=var_ty (1,2,3,4,5);--declare and initialize
  4  begin
  5     for i in 1..v.count loop
  6       dbms_output.put_line(v(i));
  7    end loop;
  8* end;
SQL> /
1
2
3
4
5
PL/SQL procedure successfully completed.

Similar Messages

  • IPhone basic code syntax in xcode

    Hello !
    i am new to iPhone and Xcode.
    Can anyone tell me what does the syntax
    ?YES:No
    means in
    -(BOOL) isReachableWithoutRequiringConnection;(SCNetworkReachabilityFlags)flags
    return (isReachable && noConnectionRequired) ? YES : NO;

    Hi, the expression
    return (<exp1> ? <exp2> : <exp3>)
    is a short version of
    if (<exp1>) {
    return <exp2>;
    } else {
    return <exp3>;
    So in this case it means: return YES if both isReachable and noConnectionRequired are true (YES) otherwise false (NO).
    Altough it could be writen as
    return (isReachable && noConnectionRequired)

  • Please help with some basic javascript syntax

    Can anyone please help me with a "remove from favourites"
    facility i'm working on.
    I query to get all the favouites, then i output those
    favourites down the page
    each favourite has a "remove from favourites" link - i want
    to make it so when a user clicks this link they get a javascript
    confirm box pop up saying "are you sure you want to remove
    #favourites name# from your favourites?"
    so i have..
    function remove(profile,name) {
    if (confirm("Are you sure you want to remove #name# from
    your favourites?")) {
    window.location =
    "remove_from_favourites.cfm?deleteFavID=#profile#&removedName=#name#"
    and
    <div
    onClick="remove(#rs_favs.favouriteeID#,#rs_favs.firstName#)"
    >Remove from favourites</div>
    but it doesn't work - i think there are 2 problems..
    problem 1 - i have used the CF # in the remove function as i
    don't know what one does in javascript to "output" a variable (see
    where it says "Are you sure you want to remove #name# from your
    favourites") what should i use in place of the "#"?
    problem 2 - i have tried to pass to variables to the function
    >>
    onClick="remove(#rs_favs.favouriteeID#,#rs_favs.firstName#)" and i
    have separated them but a commer "," but i suspect that is
    incorrect syntax
    if anyone could please help me i'd be very grateful as, to be
    honest, i love coldfusion - but javascript just hurts my head! :(
    thanks very much indeed.
    PS the way i've wrapped my "remove from favourites" text in a
    div rather than making it an actual "a href" link - is that right
    or is there a better way (ideally i'd like the text to look like
    all my other links (ie they underline on mouse over)

    You can simply add CSS commands to define your div to look
    like your links.
    div#FavLink
    color: blue;
    text-decoration: underline;
    cursor: pointer;
    <div id="FavLink"
    onClick="remove(#rs_favs.favouriteeID#,'#rs_favs.firstName#')"
    Remove
    from favourites</div>
    That should get you started.
    happysailingdude wrote:
    > thanks CFDEBUG that sorted it - thanks very much
    >
    > just one last thing - more of a CSS issue i think but
    maybe not.
    >
    > so now I have <div
    >
    onClick="remove(#rs_favs.favouriteeID#,'#rs_favs.firstName#')"
    >Remove from
    > favourites</div>
    >
    > which of course isnt a link so it just looks like my
    standard text (as if i'd
    > done <p>Remove from favourites</p>
    >
    > how do i make the "Remove from favourites" text look
    like a link as if i'd
    > done <a href="remove_from_favourites.cfm?....."
    >Remove from favourites</a>
    >
    > i think ive seen links that when you hover over them it
    says "javascript:void"
    > or something at the bottom of the browser - is this the
    answer and if so what
    > is the correct syntax please? or do i need to do
    something with my CSS file?
    >
    > thanks very much indeed for any further help anyone can
    give me to get this
    > page finshed off - thank you
    >

  • Basic package syntax

    I'm creating a new class in a package called beans. Problem is, my attempts to create an object in the new file using the old file's class produces a "cannot resolve symbol" error. I've fiddled about but nothing's worked. Here's some snippets:
    package pk;
    public class Db implements java.io.Serializable {
        public Db() {
        private String update(Connection conn, String sql, Vector param) throws SQLException {
    package pk;
    public class X implements java.io.Serializable {
        public X() {
        private String InsertX(Connection conn) {
            Db db;
    db.update(conn, sql, param);
    }Both lines in InsertX fail. Thanks in advance for any help.

    Are you using the -d option in javac to specify where your class files are to be stored? And, do you put the the same location in your classpath when you run java?
    For example:
    javac -d classes src/pk/Db.java
    javac -classpath classes -d classes src/pk/X.java
    // assume Db has a main method
    java -classpath classes pk.Db.javaThis assumes you have a src/pk directory containing your source, and a classes directory where java automatically create a pk sub-directory to store your class files.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Why are those functions different in syntax

    I got two functions like below. I wonder why one uses the "*" the other one doesn't. And why not NSBOOL but only BOOL ?
    <code>
    NSString *boolString(BOOL yesNo){
        if (yesNo==NO) {
            return (@"YES");
        else {
            return (@"NO");
    </code>
    <code>
    BOOL areIntsDifferent (int thing1, int thing2)
        if (thing1 == thing2) {
            return (NO);
        } else {
            return (YES);
    </code>

    Is "->" a Javascript operator? I don't know anything about PHP. (There *is* a C operator '->' and it's similar ... I think.)
    Consider this:
    You have an object "hello world" (zero-terminated) somewhere in memory. How do you tell a function to do something with it, something like adding a '!' at the end? You could send over eqch character, one at a time, until you encounter the zero; and the 'receiving' function ought to collect characters until it gets that zero. But then you have a *copy* of your string, and modifying the copy will not influence the original.
    If you instead send *the address where it is stored*, the function can modify the original. You "send" the address of an object by prepending it with an ampersand '&amp;'  when calling the function, and that function needs to know it receives an address (rather than a literal value) so you tell it does so by using '*' in the declaration for that variable.
    In a function declaration like your "boolString" one, adding a "*" after the return type "NSString" (which may be of *any* type), you tell the compiler it ought not to return literal characters "Y", "E", and "S" or "N" and "O" but instead do the following: when creating these strings in memory as an NSString, return *the address of* this NSString instead.
    If you call this function from somewhere else in your code, you would use sth like
    NSString *result = boolString(YES);
    because you will expect to receive a pointer, rather than the original object.
    This is extremely basic C syntax, and you would do well to get better acquainted with it (or, better yet, entirely comfortable) before you dive any deeper into Objective-C.

  • Text Editor & ABAP Syntax Check

    Hi all,
    I've included a text editor box into my project to allow the user to key in ABAP codes. i got the codes of a sample program but i'm not sure how it works. can anyone kind enough to explain to me how to add buttons or assign functions to the buttons?
    secondly, because i allow free-text for the user to key in ABAP codes, is there a function to check the syntax of the codes entered by the user?
    i'll reward handsomely for any help rendered and it will be better if you could include sample codes as well(:
    thanks!!! (:
    SAMPLE CODE FOR TEXT EDITOR:
    IF CODE_EDITOR IS INITIAL.
        CREATE OBJECT CODE_EDITOR_CONTAINER
           EXPORTING
             CONTAINER_NAME = 'GEN_CODE'
           EXCEPTIONS
             CNTL_ERROR = 1
             CNTL_SYSTEM_ERROR = 2
             CREATE_ERROR = 3
             LIFETIME_ERROR = 4
             LIFETIME_DYNPRO_DYNPRO_LINK = 5.
        CREATE OBJECT CODE_EDITOR
          EXPORTING
            PARENT = CODE_EDITOR_CONTAINER
            WORDWRAP_MODE =
            CL_GUI_TEXTEDIT=>WORDWRAP_OFF
              CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
            CL_GUI_TEXTEDIT=>WORDWRAP_AT_WINDOWBORDER
            WORDWRAP_POSITION = G_EDITOR_LENGTH
            WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.
    ENDIF.
    Edited by: Leslie Koh on Jan 18, 2008 4:28 AM

    Hi Leslie
    There is a abap key word which may help your purpose to do the syntax check. Please check the key work "SYNTAX-CHECK FOR itab " to be more in details,
    Basic form :
    SYNTAX-CHECK FOR itab ...MESSAGE f ...LINE g ...WORD h.
    Extras:
    1. ... PROGRAM f1
    2. ... INCLUDE f2
    3. ... OFFSET  f3
    4. ... TRACE-TABLE itab1
    5. ... DIRECTORY ENTRY f4
    6. ... REPLACING f5
    7. ... FRAME ENTRY f6
    8. ... MESSAGE-ID f7
    9. ... ID id TABLE itab2
    10.... SHORTDUMP-ID f8
    11.... FILTER f9
    This syntax will help you to check the syntax errors of ABAP program passed as internal table. You can get the entries keyed in by user in editor control through class method CL_GUI_TEXTEDIT->GET_TEXT_AS_R3TABLE in your PAI.
    Hope this helps !
    Kind Regards
    Ranganath

  • Help to read the complete basic idoc structure

    Hi,
    I have the following Basic Idoc structure
    1. /DSD/HH_CONTROL01- Control data for hand held interface.
    1.1 /DSD/HH_E1CTHD01- Control data header.
    1.1.1 /DSD/HH_E1CTAD02- Control idoc- Application data header
    1.1.1.1 /DSD/HH_E1CTID03- Control idoc- Application data item
    1.1.1.2 /E1WXX01- Segment for customer enhancement to be used as requirement.     
    OBSERVATION----
    1. The basic idoc (1) is found in table EDBAS and description in EDBAST.
    2. The segments (1.1.1.2) are in table EDISEGMENT and EDISEGT.
    3. All the other structures (1.1), (1.1.1), (1.1.1.1) are found in tables EDISDEF and some in EDISEGMENT.
    QUESTIONS----
    1.What query can I write to get the above basic idoc structure?
    2.How are the relationships mapped among the tables?
    Thank you, points will be awarded for your time and answers.

    REPORT  ZPGM_BASIC_IDOC_IMPRT_TO_PCNTR.
    TABLES: EDBAS, " Basic types
            IDOCSYN. " Syntax Description for Basic Types
    DATA: BEGIN OF ITAB OCCURS 0.
            INCLUDE STRUCTURE IDOCSYN.
    DATA: END OF ITAB.
    SELECT A~IDOCTYP " Basic type
           B~NR      " Sequential Number of Segment in IDoc Type
           B~SEGTYP  " Segment type
           B~PARSEG  " Name of parent segment
           B~PARPNO  " Sequential number of parent segment
           B~PARFLG  " Flag for parent segment: Segment is start of segment
                                                                 "  group
           B~MUSTFL  " Flag: Mandatory entry
           B~OCCMIN  " Minimum number of segments in sequence
           B~OCCMAX  " Maximum number of segments in sequence
           B~HLEVEL  " Hierarchy level of IDoc type segment
           INTO TABLE ITAB
           FROM EDBAS AS A INNER JOIN
                IDOCSYN AS B
            ON AIDOCTYP EQ BIDOCTYP.
    SORT ITAB BY IDOCTYP NR." Sort the idoctype and according the segment "
                            "number for the right order in the basic idoc
                            "syntax.
    LOOP AT ITAB.
      AT NEW IDOCTYP.
          WRITE:/ '***********'.
          WRITE:/1 ITAB-IDOCTYP.
      ENDAT.
         WRITE:/.
         SY-COLNO = 5 + ( ITAB-PARPNO * 2 ). " this displays the segments
                                             "under the respective parent
                                             "segments.
         WRITE AT SY-COLNO ITAB-SEGTYP.
    ENDLOOP.
    Thank you.

  • How do I link to a specific frame in the timeline of an Edge document from a different page?

    lI have the intro of my new website made in Adobe Edge Animate, however I don't want people to watch the intro every time they click "back". So is there a way of linking directly to a label from another page? Should I use something like:
    "<a href="page_URL.com/edge_file.html" target="label_in_the_timeline">"

    Hey Squeege,
    I highly recommend you becoming familiar with basic javascript syntax (setting variables, functions, scope, if/else statements). Knowing at least the basics really makes Edge Animate come alive, and gives you a lot more power inside the application.
    Taking the code from the other thread, you would do something like this, on Stage.compositionReady event:
    // function to grab specified param
    sym.getParam = function(name) {
        name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
        var regexS = "[\\?&]" + name + "=([^&#]*)";
        var regex = new RegExp(regexS);
        var results = regex.exec(window.location.href);
        if (results == null)
            return "";
        else
            return results[1];
    // get query param called 'param', (should be "true", "false", or leave it out)
    var playIntro = sym.getParam('param');
    if( playIntro == "true" ) {
         // tell sym to play intro label
         sym.play( "intro" );
    }else if( playIntro == "" ) {
         // tell sym to play intro label
         sym.play( "intro" );
    }else if( playIntro == "false" ) {
         // tell sym to play skipIntro label
         sym.play( "skipIntro" );

  • HOW TO DISPLAY HTML FILE

    I'm trying to display a help file created in html when a menu item is clicked.Can someone please help with the code to do that...
    Thanking you in advance...

    jverd wrote:
    DrLaszloJamf wrote:
    jverd wrote:
    Step 1) Learn basic Java syntax.
    Step 2) Learn Swing.
    Step 3) Profit.You forgot the clean underpants!Since when was "clean" a requirement?Since when was Step 2 anything but "?" ?

  • Oracle 9i Related

    Dear all,
    Is it possible to learn PL/SQL on MS SQL SERVER 2000? I got a Licensed software on my comp. I'd like to learn a bit about Sql, Forms and Reports. Where can I find the best beginners tutorial on the above.
    Regards
    Khurshed

    No.
    PL/SQL is Oracle's SQL Proceduraaal Language extension to SQL. Microsoft adapted the SYbase procedural language extension called Transact-SQL
    You can learn basic SQL syntax on either Oracle or SQL Server, but the habits you will pick up doing so on SQL Server (putting a lot of SQL statements into procedures unnecessarily, extra commits, not using bind variables appropriately) will hurt your successful adoption of Oracle. This is discussed at length in Chapter 1 of any of Tom Kyte's books (see http://apress.com for most of his books.)
    You might be happy to know that you can legally download and use Oracle's software at no charge. All versions available on the download area of http://otn.oracle.com can be used for evaluation and development.
    As well, the Oracle Database 10g Release 2 Express Edition (XE) can also be used for free in production. I'd encourage using this one for learning - usually easy to install and small footprint.

  • Remove All from Page Item

    Hi!
    I 've a report that does't make sense to use a date with All in the Page Item.
    Can anybody tell me how can I remove <All> from the page item.
    Thanks a lot,
    Leila

    Hi Gianluca
    You are right because I did not understand. Now I do and thanks for explaining otherwise I would have continued down that path for years. :-)
    Ok, what you need to do is to create a new data type within your workbook, then more than likely in conjunction with one or more analytic functions, Discoverer will create the sub-totals and totals that you want.
    Here is an example that may show the principle:
    You can use calculations to create new data types within your worksheet. These new types only exist within the worksheet. You can apply sorts, totals and even base other calculations on these data types.
    Example Data Type:
    Let’s say we want to generate a new data type called Category, and this category has three values
         High
         Middle
         Low
    We want to analyze our sales and work out our top ranking customers, such that customers with:
         Sales > 9,000,000 are High
         Sales > 4,000,000 but < 9,000,000 are Middle
         Sales < 4,000,000 are Low
    Basic Requirement - Syntax:
    IF Sales > 9,000,000
    THEN HIGH
    ELSE IF Sales > 4,000,000
    THEN MIDDLE
    ELSE LOW
    Using a CASE statement, this translates into:
    CASE WHEN Sales > 9,000,000 THEN ‘High’
    WHEN Sales > 4,000,000 THEN ‘Middle’
    ELSE ‘Low’
    END
    Here's an example using DECODE:
    You have been asked to create a report that combines the sizes Small and Mini into a new category called Tiny so that we report
         Large
         Medium
         Tiny – combined Small and Mini
    Basic Syntax:
    IF Product Size = SMALL
    THEN Type = TINY
    ELSE IF Product Size = MINI
    THEN Type = TINY
    ELSE Type = Product Size
    Using a DECODE statement this translates into:
    DECODE (Size, ‘SMALL’, ‘TINY’, ‘MINI’, ‘TINY’, Size)
    Best wishes
    Michael

  • Querying Excel file in Report Builder 3.0

    I set up an ODBC connection in Report Builder 3.0, connected to my Excel sheet as my data source, and I can set up a data set that queries one sheet at a time fine. But can I join two sheets in a data set query? I always get "Syntax error in FROM
    clause." I thought I could use basic SQL syntax in the query and it would be fine. Is there a certain syntax or trick, or can this just not be done?

    Hi (datasci),
    You can create a linked server in SSMS, then create a procedure to join three sheets. Then you can call the procedure in a dataset.
    As we tested in our environment, we create a linked server and the procedure like below:
    --linked server
    EXEC sp_addlinkedserver
    @server = 'ExcelServer',
    @srvproduct = 'Excel',
    @provider = 'Microsoft.ACE.OLEDB.12.0',
    @datasrc = 'c:\Book3.xls.xlsx', -- the path in the server where SQL server locates
    @provstr = 'Excel 12.0;IMEX=1;HDR=YES;'
    EXEC sp_addlinkedsrvlogin 'ExcelServer', 'false'--, 'sa', 'Admin', null
    go
    --procedure
    CREATE PROC proce2
    as
    SELECT a.Name,a.Amount,b.PtNo,b.value,c.Gender
    FROM ExcelServer...[Sheet1$] as a
    left join ExcelServer...[Sheet2$] as b on a.Name =b.Name
    left join ExcelServer...[Sheet3$] as c on c.PtNo =b.PtNo
    Then we call the procedure in the dataset, we get the expected result:
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Outbound idocs failed

    Sending out material master
    extended the idoc MATMAS03
    Created one segment with one field
    added it to the idoc
    populated that segment in the Customer Exit
    'CAll function 002' of FM:Masteridoc_create_matmas
    On sending the materials via bd10
    I get errors with status 26
    1. 26 error during syntax check of idoc(outbound)
    Get details from previous status records with status 26
    2. 26 error during syntax check of idoc(outbound)
    EDI:Idoc has more than one syntax errors
    2. 26 error during syntax check of idoc(outbound)
    Syntax error in idoc (mandatory group missing)
    Inspite of all these errors Data records are correctly populated.
    Please advice

    Hi,
    I believe you have are either using a custom basic type or you might have added an extension to the standard basic type. 
    The outbound idoc which has been created is missing a mandatory segment in the idoc, check which is that segment and recheck the code why that segment is not populated while your idoc is created.  This is basically an syntax error.
    Thanks,
    Mahesh.

  • Connecting JDBC to MS SQL Server 2000

    I need help!
    I just download a type 4 jdbc driver for MS SQL Server 2000, but i try the help files. i don't really understand how to connect. there is hostname, port but if i want to connect to the northwind database and query from customers table, how can i do that?
    i currently using jdk1.4 and ms sql server 2000 enterprise edition. hope someone can show me a code sample on that..thank you.
    please send to my email please... [email protected]

    which driver r u using ?
    Basically the syntax is like below: (with M$ djdbc driver for example).
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    Connection con =
    DriverManager.getConnection("jdbc:microsoft:sqlserver://host:1433;DatabaseNa
    me=dbname","user","password");
    Foe the others, please read the documentation for the driver.

  • Orphaned default - problem

    I am a studying SCJP and am a newbie. My tutor wanted me to write a simple program to display the default values of data types. I tried it in the following ways, but there is an error - orphaned default. How do I fix this??
    class H{
         public static void main(String[] args)
    {          boolean x; {if (x==x)
                        default:}
    class W{
         public static void main(boolean x, boolean y)
    {           if (x==y)
                        default:
    Please help

    crazy_king wrote:
    I am a studying SCJP and am a newbie. My tutor wanted me to write a simple program to display the default values of data types. I tried it in the following ways, but there is an error - orphaned default. How do I fix this??By learning some basic Java syntax.
    [_Learning the Java Language_|http://java.sun.com/docs/books/tutorial/java/index.html]
    Also in future please use the code formatting tags when posting code.

Maybe you are looking for