Why this variable declared as a table to 2 Dimensions?

Hello
I am very new to PL/SQL... I just bought a book written by IVAN BAYROSS...

In this book, a variable is declared as follows:

Current_balance COMP (11.2);

Now, what is 11 and which is 2?

Can someone please tell me this?

Hello

is the length of 11 to 2 decimal
example: 111111111.25

Tags: Database

Similar Questions

  • Why this dot on the typedef table indicator strict coercion?

    Why is there a constraint on the second point control?

    I created a table of 3 trivial elements of doubles and created an indicator by right-clicking on it in the block diagram. It is the control of "CreateIndicator".

    Then I did the same thing to create a second indicator on the same wire from the selected Panel and output it he adapted to a strict typedef, saved and applied the changes. It is the control of "CreateIndicatorThenCustomize". There one point of coercion in this regard, if. Why?

    Thanks to anyone who can shed some light on this for me!

    Don't get started me on the "point of constraint = copy of the buffer" falicy (hm, I think you just!)

    It this case LV says you type conversion non-defed in type-def, who all had there.

    Ben

  • Newbie question - passing variables (aka why this work?)

    I spent a few hours in vain trying to pass the value of a html text box to a coldfusion page 2nd via the URL (query string).

    However, it seems that I can't do this because the 2nd page seems to be able to reference the value in box of text in any case.  My question is: is this a coincidence, or is this the normal procedure, things work?  When I click the "Run report" button, everything I typed in the text box appears on the screen of page2.cfm.  I thought I should pass this value somehow (via the variables session or the URL string or something).

    So my newbie question is: is this the way it should work (a simple answer Yes or no is fine)A text from one box. CFM file can reference the value of text box on the other. CFM page? Thanks in advance

    Here is the page 1 (page1.cfm):

    <! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / BY" > ".
    < html >
    < body >

    " < CFform action = ' http://www.mywebsite.com/page2.cfm "method ="get"> "
    Cust ID: < cfinput type = "text" name = "CustomerID" >
    < input type = value = "run report" >

    < / CFFORM >
    < / body >
    < / html >

    Page 2 (page2.cfm) here which works fine and shows what I typed in the text box:

    < CFOUTPUT >
    #CUSTID #.
    < / CFOUTPUT >

    I was already typing this until Ian replied. But I may as well post it in case it helps...

    > I spent a few hours * in vain * trying to pass the
    > value of a html to a coldfusion page 2nd text box via the
    > URL (query string).

    If you know that he or she is actually what you 're doing.

    "> http://www.mywebsite.com/page2.cfm" method = "get" >
    > Cust ID:

    When you use method = "get", the form field, the variables are passed in the query string. So, if you enter "abc" in the text box, the URL submitted will be:

    http://www.mywebsite.com/page2.cfm? CustID = abc

    So 'CustomerID' will be available as a variable within the scope of the URL on page 2.

    > * Here's page 2 (page2.cfm) which works fine and shows
    > what I typed in the text box: *.
    >
    > #CUSTID #.
    >

    The reason for which he works is a little magic CF. The variable #custID # not be bounded, CF search this variable in a predefined list of staves (see link below). It looks in each of them, and uses the first value it finds. Although not the exact search order, CF will check the

    http://livedocs.Adobe.com/ColdFusion/8/Variables_32.html
    -VARIABLES in scope (at the time..)
    -Reach URL (at the time..)
    -FORM scope (at the time..)
    ... etc...

    In your case, the variable exists in the scope of the URL. If your code is equivalent to saying

    #url. CUSTOMERID #.

    It is in fact a practice better coding. Although the original code works without the scope of variables, providing an explicit framework is more efficient and avoids unitentional errors.  For example if the code on page 2:


         #CUSTID #.

    ... the output may not be what you would expect ;-)

    So to answer the question: Yes, that's what must happen.  However, you must explicitly scope your variables page 2 IE use #url.custID #.

  • How to insert directly variable cursor in a table

    Hi all

    I use an attribute % ROWCOUNT cursor and I would like to insert the value into a table. When I try to do this directly, I got the error ORA-00911 invalid character. Inserting however more intermediate variable works. No idea why?

    Consider that I have a table called une_table with for example two rows and SOME_TABLE2 with a column of type NUMBER (10) for example. Then I try to run the code like this:

    DECLARE

    CURSOR cur_Test IS

    SELECT * FROM UNE_TABLE;

    BEGIN

    FOR c IN LOOP cur_Test

    DBMS_OUTPUT. Put_line (cur_Test % RowCount); -This line is ok

    INSERT INTO SOME_TABLE2 (COL1) VALUES (cur_Test % ROWCOUNT); - here, it fails

    END LOOP;

    END;

    However when I run it like this:

    DECLARE

    I have SEVERAL;

    CURSOR cur_Test IS

    SELECT * FROM UNE_TABLE;

    BEGIN

    FOR c IN LOOP cur_Test

    DBMS_OUTPUT. Put_line (cur_Test % RowCount); -This line is ok

    I: = cur_Test % ROWCOUNT;

    INSERT INTO SOME_TABLE2 (COL1) VALUES (i); - now it works

    END LOOP;

    END;

    I guess that the character '%' the cause of the problem. Maybe there is some way of backslash or something?

    Of course I can use ROWNUM value or another solution, I'm just curious as to why it does not work.

    Thanks for help

    > I'm just curious as to why it does not work.

    Use of the attributes of PL/SQL in SQL cursor is not taken in charge, according to the documents.

  • Please help: why my variables are not displayed in the subtemplate?

    Hi all

    We use BEEP 11.1.1.6 (build 5.12.110)

    We have several models of rtf and some with templates.

    In this case, I declared a variable var1 in the upper part of the main model.
    I also said variable var2 in the subtemplate.

    In the subtemplate, I added this command:
    var1:<?xdoxslt:get_variable($_XDOCTX, 'var1')?>
    var2:<?xdoxslt:get_variable($_XDOCTX, 'var2')?>
    var2 always displays normally.
    var1 is always null (RC = NaN when I pass it as a parameter to the submodel)
    The value appears correctly the second main folder of XML data.


    Is there something wrong in my code?
    Is there a reason why the variable is NULL in the first record of the main loop?

    Please find attached an example with different variables and params:
    https://FTS.Capgemini.com/pubpwd/66814124735400/XML_Publisher_test.zip link is valid until 2013-05-13 13:00 UTC (access with local public password)
    Username: ijtzggnrz
    Password: uP8YrdRPKc

    I hope my explanation is clear.
    Thanks in advance,
    Olivier

    Look at the response of amri in Obtaining Variable in footer of RTF
    >
    Variables when declared in the body section are not available in the scope of the header/footer.
    So you can't put in the body section and see the same thing in the header/footer.

    I think you want to have the header/footer conditional for some sets of pages. If you can explain your condition here we offer if this is possible.
    >

    and the response of the Vetsrini in the use of variables within a foot of the RTF template
    >
    Footer is in a different context,

    If you will not be able to use the variable declared in the page inside the footer,

    try to create a sample footer variable is assign a value and displays
    you will be able to display that correctly...

  • APEX 4.2 translate data 'function and Global Variable declaration '.

    Hello everyone,

    I use APEX 4.2.1.00.08 and I wonder if there is a way to translate "Function and Global Variable declaration" textarea. Any other script text box is available for translation, but not this one.
    I know what the code is loaded on the header, but may contain important alert messages of global functions.

    Thanks in advance.

    Hi Grandmaster,

    "Function and global variables declaration" contains the JavaScript code, that is why it is not wise to include in the standard translation process.

    In my opinion, you have several options to access your translated messages:

    -) Use Application-> Substitutions or
    -) Store your message in the form of component shared-> SMS and and assign it to an application with the APEX_LANG element. Api MESSAGE (http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_lang.htm#CHDBCEAB)

    In 'Function and Global Variable declaration' use substitution syntax to replace the value. For example:

    var myDeleteMessage = "&G_MY_DELETE_MESSAGE.";
    ...
    alert(myDeleteMessage);
    

    where G_MY_DELETE_MESSAGE would be a part of the application or the request for Substitution.

    Concerning
    Patrick
    -----------
    Member of the APEX development team
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Problem with variable declaration

    I'm developing a multiuser Flash application, using the smartfox Server 2.0, but I'll have a problem with defining/declaration of a variable/object/table and then access. I am trying to set the "curMap" (be it a variable, the matrix, the object, everything that works) within the following function, like the array returned by the server, "resObj". It works fine as long as I only call 'curMap' within this function (see you in line: r_txt.text = curMap ;)) However whenever I try to call the "curMap" on the coding of the image outside the function, it returns under the indefinite form or usually nothing.  Any ideas on how to properly / attribute this? I tried various things (such as _root, _global or setting the var "curMap" outside of the function) with no luck.

    Here is my Code:

    smartfox.onExtensionResponse = function (resObj:Object, type: String)
    {
    If (type is 'xml')
    {
    If (resObj._cmd is "getMap")
    {
    curMap = resObj.db [0];
    r_txt. Text = curMap;
    } Else if (resObj._cmd == "getSurr") {}
    surrMap = resObj.db;
    b_txt. Text = surrMap [0];
    }
    }
    }

    Thank you

    Make sure that you are trying to access this variable before it is defined.  That is to say, which resembles an asynchronous function for the code of this function will probably run AFTER the code that appears in the lines that follow the body of the function.

  • Make sure this variable is initialized only once in a movieclip

    Guys, what is the way to ensure that this variable is initialized only once in each instance of movieclip?

    I tried:

    If (! isLocked)

    {

    trace ("' configuration variable isLocked '");

    var isLocked:Boolean = new Boolean (false); I need this variable to be initialized only once for each instance of the movieclip and set to false

    }

    but it does not work.

    Any ideas?

    One way would be to simply declare the variable and not iassign it a val\ue.  It will be by default with the value false, but when changed to be true, it will remain.

    var isLocked:Boolean;

    later...

    isLocked = true; will stay true

  • The final value of a variable declaration

    Hi all

    I work through a project that has many different results based on what options the user click.

    Basically, I set up a variable called "totalclicks" and set a tip action to assign the value 1 to this variable whenever a user clicks on the selected items.

    I was wondering is there an easy way to get the final value of the "totalclicks" to display in a report? We currently use an internal server and Adobe Quiz results Analyzer. Ideally, I would have just the user 'show results' as normal and the value of this variable is displayed somewhere.

    Any ideas?

    Thank you

    It would be easier if you posted a screenshot of the slide: are all those click boxes on a slide, or you want to go to the next slide, click on another box click here? I ask this because of your sentence «Continues the slide...» » ?

    No need to create another user variable. Perhaps you understand very well what it means to be a variable: it is just a container, and you can change its value as many times as you want.

    So, if you want the click to increment and move to the next slide, the advanced standard action would be:

    Expression totalclicks = totalclicks + 1

    Go to the next slide

    With the first click var will increase to 1, with the 01:58, etc. In the statement list progress of actions, in opposition to the drop-down list of simple actions (accordion) you do not Increment (ask the devs since many versions to add it, but they can't hear me). This is the reason why you need to the statement Expression.

    Take a look on: http://blog.lilybiri.com/statements-advanced-actions-in-captivate-6-li

    Lilybiri

  • Variable declaration

    Hi all

    I have this code:

    Declare
    v_today date: = sysdate;
    v_hello VARCHAR (20): = 'Hello world ';
    v_tomorrow v_today % TYPE;
    BEGIN
    DBMS_OUTPUT. Put_line (v_hello);
    DBMS_OUTPUT. Put_line (v_today);
    DBMS_OUTPUT. Put_line (v_tomorrow + 1);
    END;

    The result is:

    Hello world
    14 DECEMBER 11


    How to declare this variable (* v_tomorrow v_today % TYPE; *) correctly so I get the result:

    Hello world
    14 DECEMBER 11
    DECEMBER 15, 11

    Thank you very much!!
    Declare
    v_today date :=sysdate;
    v_hello VARCHAR(20):='Hello World';
    v_tomorrow v_today%TYPE;
    BEGIN
    v_tomorrow := v_today;
    DBMS_OUTPUT.PUT_LINE(v_hello);
    DBMS_OUTPUT.PUT_LINE(v_today);
    DBMS_OUTPUT.PUT_LINE(v_tomorrow+1);
    END;
    /
    
  • How to find the number of bind variables declared in the current session

    Hi all
    I want to know a query to find out the number of variables declared in the current session.

    Note that the name of this forum is "SQL Developer *(Not for general SQL/PLSQL questions) * ', as well as for the issues with the SQL Developer tool. Please post these questions under the dedicated [SQL and PL/SQL | https://forums.oracle.com/forums/forum.jspa?forumID=75] forum (you have posted here before).

    Kind regards
    K.

  • Why this update needs suddenly an index partitioned locally to run fast?

    Dear,

    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    AMT for Solaris: release 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production

    I would like to understand the following situation.

    I have a partitioned table defined as range
    part_tab (id, dat, b, c, d, e, f, g, h, i)
    This table is partitioned on dat range and has a primary key on (b, id, dat) covered by a unique index of the tree b (b, id, dat). The PK column order is not the same as in the definition of the table!
    This table is filled every day by a night of employment (140,000 new records inserted every day) and also updated (800,000 updated records) as follows

    for x in (select id, dat, b, c, d, e, f, g, h, i
    distant_tab say - simple heap table having a PK (id, dat, b) and accessible through a dblink
    where dis.dat between trunc (sysdate-7) and trunc (sysdate - 1).
    )
    loop
    Update part_tab loc
    set
    Loc.c = dis.c
    loc.d = dis.d,
    loc.e = dis.e,
    loc.f = dis.f,
    loc.g = dis.g,
    loc.h = dis.h,
    loc.i = dis.i,
    where
    Loc.b = dis.b
    and loc.id = dis.id
    and loc.dat = dis.dat
    end loop;

    commit;

    This update took 40 minutes to finish in PRODUCTION for more than 3 months.

    Last week the distant_tab has been purged and went from 12.000.000 records to 1,000,000 records.
    But the update is still almost a fixed number of records to be updated (800,000 records). Statistics on a remote table has also been updated and the updated runtime remains almost the same (40 minutes).

    Unfortunately, one day, this update started taking 3 hours to complete. So it has been for 3 days until we have created a unique partitioned index local (dat, id, b) on part_tab which
    did the update runing on less than 10 minutes.

    Unique consistency, that I can do with this suddenly high time update is that it starts happening immediately in the distant aftermath of the table
    distant_tab has been shrinked (offline) to set the high-water line. Maybe it has nothing to do with this 3 hours run time but it is worth mentioning.

    So my question is:

    Why this update, which took 40 minutes for more than 3 months, it must now have an index partitioned locally rather than the index b-tree in 10 minutes, otherwise it will take 3 hours?
  • Why this two queries are not same

    Hi all

    Can you please explain this fundamental thing. Why this two queries are different. (10.2.0.3 Solaris Sparc 64)
    create table x1(a1 varchar2(10),a2 number, a3 varchar2(10));
    create table x2(b1 varchar2(10),b2 number, b3 varchar2(10));
    insert into x1 values('X101',1,'XX1');
    insert into x1 values('X101',1,'XX1');
    insert into x1 values('X102',1,'XX2');
    insert into x1 values('X103',2,'XX3');
    insert into x1 values('X104',2,'XX4');
    insert into x1 values('X105',3,'XX5');
    commit;
    
    insert into x2 values('X101',1,'X21');
    insert into x2 values('X101',1,'X21');
    insert into x2 values('X102',1,'X22');
    insert into x2 values('X103',2,'X23');
    insert into x2 values('X104',2,'X24');
    commit;
    
    WITH xx AS (select b1,b2 from x2 where b1 IS NULL)
     select x1.* from x1 ,  xx
      where x1.a1 = xx.b1(+) and  x1.a2 = xx.b2(+) ;
     
    A1                 A2 A3
    ---------- ---------- ----------
    X105                3 XX5
    X104                2 XX4
    X102                1 XX2
    X103                2 XX3
    X101                1 XX1
    X101                1 XX1
     
    6 rows selected
     
    select x1.* from x1, x2 where x1.a1 = x2.b1(+)
        and x1.a2 = x2.b2(+)  and x2.b1 IS NULL;
     
    A1                 A2 A3
    ---------- ---------- ----------
    X105                3 XX5
     
    select b1,b2 from x2 where b1 IS NULL;
     
    B1                 B2
    ---------- ----------
     

    Thank you!
    NA not (sentence of) think of this.
    + (it's one of those things that I really need of don't forget do not forget ;)) +)

    hoek&XE> select x1.*
      2  from   x1
      3  where not exists ( select null
      4                     from   x2
      5                     where  x1.a1 = x2.b1
      6                     and    x1.a2 = x2.b2
      7                    );
    
    A1                 A2 A3
    ---------- ---------- ----------
    X105                3 XX5
    
    1 rij is geselecteerd.
    
    Uitvoeringspan
    ----------------------------------------------------------
    Plan hash value: 816925353
    
    ---------------------------------------------------------------------------
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    ---------------------------------------------------------------------------
    |   0 | SELECT STATEMENT   |      |     5 |   100 |     5  (20)| 00:00:01 |
    |*  1 |  HASH JOIN ANTI    |      |     5 |   100 |     5  (20)| 00:00:01 |
    |   2 |   TABLE ACCESS FULL| X1   |     6 |    72 |     2   (0)| 00:00:01 |
    |   3 |   TABLE ACCESS FULL| X2   |     5 |    40 |     2   (0)| 00:00:01 |
    ---------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - access("X1"."A1"="X2"."B1" AND "X1"."A2"="X2"."B2")
    
    Statistics
    ----------------------------------------------------------
              1  recursive calls
              0  db block gets
              6  consistent gets
              0  physical reads
              0  redo size
            518  bytes sent via SQL*Net to client
            384  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    
  • Why this query can remove duplicates?

    Why this query can remove duplicates? Can someone give me detailed explanation?

    Thank you
    select salary from employees union select salary from employees;

    Hello

    See the docs.

    ' Example of the UNION
    The following statement combines the results of two queries with the UNION operator which eliminates duplicates of selected lines.
    "This statement shows that you must match the data type (using the function TO_CHAR) when the columns do not exist in one or the other table"

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/queries004.htm#i2054381

    Edit

    Here's another interpretation of your question:

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:1224636375004

    Published by: hoek on October 22, 2009 17:40

  • Why full when I index the table scan

    Can someone quickly tell me why this statement will generate a full table scan if RECEIPT_NO for both tables have a unique index.


    Select * from agency_ledger where a.RECEIPT_NO in (select receipt_no from temp)

    concerning

    Hello

    Two reason I can think
    (1) statistics are not collected or are at a standstill.
    (2) oracle considers the hash join full table scan more appropriate than the nested loop + scan small index.

    Post your explain plain and let us know stats is collected or not.
    In addition, let us know what is the percentage of rows are expected in output compared to the total number of lines.

    Concerning
    Anurag Tibrewal.

Maybe you are looking for