In the variable name variable

Hi guys/girls.

I have a problem, I have a number of tables of items called "pres1", 'pres2', 'pres3', etc.

I have a variable which will be 1, 2, 3...

the amount of the variable goes up will always be the same amount as the number in the name of the table. That is to say if the berries go up to "pres6" the variable will go does not exceed 6

I want to access the data in my table based on the currently set number variable

IE: If myVar = 2, I want to access the data in "pres2.

I'm sure that its probably something very simple and im just getting the syntax wrong, can anyone help?

Thanks in advance

If press1, press2, etc. are names of variables in the current scope, use:

trace (this ["press" + myVar] [1]);

Tags: Adobe Animate

Similar Questions

  • Retrieves the name of the variable

    Hello

    I'm trying to change the OpenG changed? Subvi (see below) so that he will write the new value of the variable sent to 'Variant' if changed on the disk (using the following config VI). To do this, I need to somehow extract the variable name of the variable (any type) which was connected to the entrance of variant of the changed? Sub - VI by VI calling so that I can use it as a key name. Is this possible? This information is still transmitted to the Subvi?

    If you use openg, there is a "Get the name of data" function that retrieves the name of the data passed in the Variant.

  • read the value of the variable knowing only one name

    Is there a way to read a variable value of knowing only the label name? I have 11 Labview and am to read a text file with a list of variable labels and try to read the value without having to create a structure of matter of hundreds of variables.

    Are we willing?

  • Question about the variable with name "

    This work is


    1. 1 package test as I said the global variable

    CREATE OR REPLACE PACKAGE test

    'TeStConsT' CONSTANT BOOLEAN: = TRUE;

    END test;

    1. 2. package sepcification

    CREATE or REPLACE PACKAGE test2 IS

    FUNCTION m)

    x in VARCHAR2) RETURN NUMBER;

    END test2;

    1. 3. package body

    CREATE OR REPLACE PACKAGE BODY test2

    FUNCTION m (x IN VARCHAR2) RETURN NUMBER IS

    b_ BOOLEAN;

    BEGIN

    b_: = TEST.testconst; return 1; -It works even if I used lower case no reason?

    END m;

    END test2;

    But it does not work

    declare

    "TeStConsT" CONSTANT BOOLEAN := TRUE ;

    Start

    if (TeStConsT) then

    dbms_output.put_line ('true');

    on the other

    dbms_output.put_line ('false');

    end if ;

    end ;

    Any thoughts why it worked on the first example. Help, please.

    See you soon,.

    Dark

    SQL language reference

    Nonquoted identifiers are not case sensitive. Oracle interprets them as letters.

    Quoted identifiers are case sensitive.

    By enclosing the names in quotes, you can give the following names to different objects in the same namespace:

    'employees '.

    'Employees '.

    'EMPLOYEES '.

    Note that Oracle interprets the following names the same, so they cannot be used for different objects in the same namespace:

    employees

    EMPLOYEES

    'EMPLOYEES '.

  • the variable name of database query to SQL Server using the Oracle database link

    Hi all

    I have an ApEx 4.1 application running on x 64 (11.2.0.1) 11g on Windows Server 2008 x 64, and I have a few points of data integration with SQL (2005 and 2008) server that I need to create. I have configured the database with dg4odbc link and it works perfectly... I can run queries on the SQL Server database without any problem using the database link.

    However, there is a scenario where the SQL Server database name is dynamic, and I need to generate on the fly in a PL/SQL block and then use it in a query dynamic SQL (all this in the ApEx). It of wherever I meet problems... when I asked the default database that is based on the ODBC connection and I don't have to specify the name of the database, no problem. But when I need access to one of the several other databases by default, I received the error "invalid table.

    It works well:* (note that 'fv' is the name of my database link)

    v_query1: = "select 'Release Date' from dbo." Schedules@FV where dbo. Annexes. "" SchedID "=: calendar";
    EXECUTE IMMEDIATE v_query1 in rel_date using the grid.




    I then take this rel_date variable, convert a varchar2 (rel_date_char), then use it as the name of the database in the following query...


    _ It returns an error(error ORA-00903: invalid table name)

    v_query2: = "select"PARTNO": rel_date_char.dbo.ProdDetails@fv where 'SchedID' =: calendar and"UnitID"=: unit"
    and 'MasterKey' =: master and "ParentKey" =: parent';

    EXECUTE IMMEDIATE v_query2 in part_number using planning, master, parent unit;



    I also tried using all of the following conditions without result:

    "select"PARTNO"of" | : rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
    "select"PARTNO"of" | rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
    "select"PARTNO"of" | @rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
    "select"PARTNO"in @rel_date_char.dbo.ProdDetails @fv where 'SchedID'..."


    Is it possible to do it in PL/SQL?

    Thanks for any help!
    -Ian C.

    Published by: 946532 on July 15, 2012 19:45

    Just did a test using passthrough:

    SQL > set serveroutput on
    SQL > declare
    2 val varchar2 (100);
    3 c whole;
    4 whole nr;
    5. start
    c: 6 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, "select count (*) from EMP");
    8 LOOP
    9 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    10 output when nr = 0;
    11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
    12 dbms_output.put_line (val);
    13 end of loop;
    14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    15 end;
    16.
    24576

    PL/SQL procedure successfully completed.

    SQL > declare
    2 val varchar2 (100);
    3 c whole;
    4 whole nr;
    5. start
    c: 6 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, ' select count (*) from dbo.) EMP');
    8 LOOP
    9 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    10 output when nr = 0;
    11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
    12 dbms_output.put_line (val);
    13 end of loop;
    14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    15 end;
    16.
    24576

    PL/SQL procedure successfully completed.

    So all 3 ways work for me.

    Published by: kgronau on July 23, 2012 10:08

    Now, using the variables to make the selection:

    SQL > declare
    2 val varchar2 (100);
    3 c whole;
    4 whole nr;
    5 tabname varchar2 (20): = 'EMP ';
    6 ownr varchar2 (20): = "dbo."
    7 dbname varchar2 (20): = "door";
    Start 8
    c: 9 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    10 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, ' SELECT count (*) FROM ': dbname: '.) ' || ownr | '.'|| tabname | ") ;
    11 LOOP
    12 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    13 when the exit nr = 0;
    14 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
    15 dbms_output.put_line (val);
    16 end loop;
    17 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    18 end;
    19.
    24576

    PL/SQL procedure successfully completed.

    => instead of executing the statement using the "execute Immediate" we use the PASTHROUGH package to pass the statement to SQL Server.

    Published by: kgronau on July 23, 2012 10:10

  • "Se ' Essbase Error (1012010): name of the Variable Redeclare"

    For business rules, I am using a macro that I declared a variable (VAR SS_Room_alloc);. When I do a validation on the Macro it validates without problem. When I go to run the commercial rule I get the error message 'cannot calculate. "Essbase Error (1012010): name of Variable Redeclare [SS_Room_alloc].

    You need to declare the variable (VAR SS_Room_alloc ;) in the rule of business or you put it in the macro using the variable? I've declared the variable and used in the calculations of the macro.

    Or y at - it known issues using the VAR command in macros?

    Any thoughts would be greatly appreciated.

    Thank you!

    Robert

    Have you tried redéclarant the VAR in the host of HBR? It would be easy to test.

    Kind regards

    Cameron Lackpour

  • Store the variable names in a database

    Salvation;

    I am storing calculations in a table of data and the need to recover them and run them in a query, one of them needs to access the value of an argument passed to the function to run the query/calculation. Problem is that I'm not sure how evaluate the variable when it is retrieved - it is not treating.

    Any ideas?

    Here's the function:

    <cffunction
     name="fnShowliveSurcharge" access="public" output="true" 
    returntype="any" hint="makes a calculation based on a formulae" >
    
            <cfargument name="avgCost" required="true" />
    
        
    
            <cfquery name="qryGetAlloys" datasource="#variables.dsn#" result="qryGetAlloys_results" >
    
                select * from nas_alloys;
    
            </cfquery>
    
            
    
            <cfquery name="qryGetGrades" datasource="#variables.dsn#" result="qryGetGrades_results" >
    
                select * from nas_grades order by id;
    
            </cfquery>
    
            
    
            <cfloop query="qryGetGrades">
    
                <cfloop query="qryGetAlloys">
    
                    <cfquery name="qryGetSurcharge" datasource="#variables.dsn#" result="qryGetSurcharge_results">    
    
                        select 
    
                            #qryGetAlloys.formulae# as myValue
    
                        from nas_alloys a left join nas_triggers t on t.alloyid = a.id
    
                        left join nas_astm astm on astm.alloyid = a.id
    
                        left join nas_estimatedprice ep on ep.alloyid = a.id
    
                        where astm.gradeid = '#qryGetGrades.Id#'
    
                        and a.id = '#qryGetAlloys.Id#';
    
                    </cfquery>
    
                </cfloop>
    
            </cfloop>
    
            
    
        </cffunction>
    

    the second line of the query is the insertion

    ((#arguments.avgCost#-t.value) * (astm.astm/100) * 1.2)

    the nas_alloys table, however the query ends up looking like;

    Select ((#arguments.avgCost#-t.value) * (astm.astm/100) * 1.2) as myValue nas_alloys a left join nas_triggers t on t.alloyid = a.id left join nas_astm on astm.alloyid astm = a.id left join nas_estimatedprice ep on ep.alloyid = a.id where astm.gradeid = '1' and a.id = '1';

    Instead of:

    Select ((2.2289-t.value) * (astm.astm/100) * 1.2) as myValue nas_alloys a left join nas_triggers t on t.alloyid = a.id left join nas_astm on astm.alloyid astm = a.id left join nas_estimatedprice ep on ep.alloyid = a.id where astm.gradeid = '1' and a.id = '1';

    Any thoughts on how to solve this problem?

    -Thank you

    -sean

    Conditional logic is possible in sql in various ways.  One way that works with anything is a case construction.

    Select case when something, then this

    When something else while

    else no matter what

    end fieldname.

    Then there are features like ifnull, coalesce, decode, etc..  Here are the specific db.  I do not use MySql so I can't tell you what functions there.

  • Get the name of the variable

    Hello

    May be a simple question, but I can't understand how in fact.

    When I do this

    //--------------------

    var obj:Object = new Object();
    obj.test = 'My Test';

    for (var i: * in obj)
    trace (I + ":" + obj [i]);

    //--------------------

    The output is-> test: test my

    My problem is when I put an object inside the object

    //--------------------

    var obj:Object = new Object();
    obj.test = new Object()

    obj.test.secondTest = 'My Test';

    for (var i: * in obj)
    trace (I + ":" + obj [i]);

    //--------------------

    The output is-> test: [object Object]

    So no idea how to get the name of the variable instead of [object Object], like the first release, but with the second code. I have an object inside an object.

    Thank you

    The following approach will dig its way.  I've added other variables to the main object just for the sake of the demo...

    var obj:Object = new Object();
    obj.Test1 = "test string";

    obj.test = new Object();
    obj.test.secondTest = 'My Test';

    obj.test2 = new Object();
    obj.test2.secondTest2 = new Object();
    obj.test2.secondTest2.val = "test deeper."

    function traceObjectVars(obj_arg:Object):void {}
    for {(var i: * dans obj_arg)}
    If (typeof (obj_arg [i]) is' objects ' ') {}
    traceObjectVars (obj_arg [i]);
    } else {}
    trace (I + ":" + obj_arg [i]);
    }
    }
    }

    traceObjectVars (obj);

  • Getting the name of the variable?

    Hi, is it possible to get the name of the defined variable?

    for example

    var description:String = "Some description";
    var variableName = getVariableName(description);
    trace(variableName); // output = "description"
    
    

    Thank you

    You can retrieve the xmllist of the variables (string or otherwise), of any object (for example, the current timeline) using the following function.  each item in the list has a property of type with the name property:

    function variableF(o:Object):XMLList {}

    .variable describeType (o) return;

    }

  • evaluate the variable name in a loop in cs3

    I want to generate names of variables in a loop and assign it a library object.

    e.g. public var missing1_mc:MissingGameObjects;
    public var missing2_mc:MissingGameObjects;
    public var missing3_mc:MissingGameObjects;
    public var missing4_mc:MissingGameObjects;

    Now, in a loop, I want to do the following:

    var ClassReference: Class;
    var missing_obj:String;

    for (var i = 0; i < usedNo.length; i ++) {}
    missing_obj = main_obj + usedNo [i] + '_', '_x ';
    ClassReference is getDefinitionByName (missing_obj) classroom;.
    'lack' + (i + 1) + "_mc" = new ClassReference(); wrong code
    'lack' + (i + 1) + "_mc".setpos (150 100); wrong code
    }

    How could I do that. Any help is appreciated.

    If you try to use the object variable names and classes of the variables, you can use the following (assuming that everything is set):

  • How to use the variable instead of the table name in the select statement of procedure

    I have a procedure with a select statement with dynamic from clause. How can I use instead of the name of the table variable.

    create or replace procedure scc_chemical_analysis
    is
    v_table_name varchar2 (100);
    Start

    declare
    cursor c1 is select * from v_table_name; -This is the variable name. How can I use it in the select statement.
    .
    .
    .
    .



    end;

    Hello

    something like that.

      1  declare
      2     vSQLString      VARCHAR2(32000);
      3  pTableName varchar2(1000):='EMP';
      4  BEGIN
      5     vSQLSTRING :=
      6  'SELECT ''x'' FROM ' || DBMS_ASSERT.sql_object_name(pTableName) || ' WHERE rownum<=1 ';
      7     EXECUTE IMMEDIATE vSQLSTRING;
      8* END;
    SQL> /
    
    PL/SQL procedure successfully completed.
    
  • Bind the Variable Table name in the query of VO

    I have a VO that must have its clause defined dynamically at run time.  I have a string bind variable defined with a default value that is referenced in the query of the VO.  However, JDeveloper allow me to leave the definition of the query of the view object when the from clause is a variable binding, even if the binding variable has the default value.

    For example.

    Select

    « X »

    Of

    : TABLE

    where

    1 = 1

    The variable binding TABLE is defined as a string with a default value of the 'double '.  Did I miss something in the definition of the VO?

    Thank you

    Hello

    I suggest you to dynamically set the query of the view object.  This does not meet your requirements.

    xxVo.setQuery ();

  • Why the prefix names of variables with a colon?

    PROCEDURE calc_avg_sales
    BEGIN
    : sales.avg: =: sales.month1 /: sales.total;
    EXCEPTION WHEN ZERO_DIVIDE THEN
    : sales_avg: = 0;
    RAISE FORM_TRIGGER_FAILURE;
    WHEN OTHER THEN NULL;
    END;

    Excerpt of Oracle PL/SQL programming ISBN 0-596-00381-1 p. 106

    Why are the variables: sales.avg,: sales.month1 and: sales.total undeclared in the snippet above? He assumes that she is? Why is a: (colon) is placed in front of the variables?

    Why would you think that FORM_TRIGGER_FAILURE is triggered instead of ZERO_DIVIDE?
    In my production environment, I noticed that error messages are sometimes vague to the user and for technical users and would like to make use of a table of errors that would contribute to technical support to troubleshoot the cause of the error, without giving unnecessary details to the end user. Ideally, this would include details of Java Exceptions raised (usually large fireplaces) in applications that are part of the software architecture. How would you with a mechanism for error handling?

    Published by: Jon80 on June 24, 2012 14:02

    Hello

    Jon80 wrote:
    PROCEDURE calc_avg_sales
    BEGIN
    : sales.avg: =: sales.month1 /: sales.total;
    EXCEPTION WHEN ZERO DIVIDE THEN
    : sales_avg: = 0;
    RAISE FORM_TRIGGER_FAILURE;
    WHEN OTHER THEN NULL;
    END;

    Excerpt of Oracle PL/SQL programming ISBN 0-596-00381-1 p. 106

    Why are the variables: sales.avg,: sales.month1 and: sales.total undeclared in the snippet above? He assumes that she is? Why is a: (colon) is placed in front of the variables?

    Variables that start with an act of colon as global variables; they can be defined in a broader scope. The colon helps the compiler identify as being not necessarily defined in the unit being compiled.

    Why would you think that FORM_TRIGGER_FAILURE is triggered instead of ZERO_DIVIDE?

    In fact, I expect PLS-00103 encountered the symbol "DIVIDE" when waiting for the following..., because you have a space (DIVIDE ZERO) instead of a line of underscores (ZERO_DIVIDE). Cut and paste real code when posting here.
    If you fix that, then ZERO_DIVIDE is thrown in the procedure. An EXCEPTION handler keeps some errors that occur at the time reported to the caller. In this case, the EXCEPTION handler is not said "the ZERO_DIVIDE report as an error. Instead, cela... ». In this example, part of what he does on the contrary raises a different error, and it is the only error appearing on the appellant.

    Furthermore, "while some OTHER THEN NULL" is almost always a very bad thing to say.

    In my production environment, I noticed that error messages are sometimes vague to the user and for technical users and would like to make use of a table of errors that would contribute to technical support to troubleshoot the cause of the error, without giving unnecessary details to the end user. Ideally, this would include details of Java Exceptions raised (usually large fireplaces) in applications that are part of the software architecture. How would you with a mechanism for error handling?

    One thing that is oracle is often of short error messages, wave print-screen, but write long posts, detailed in trace files on the database server. Programmers are educated to search a trace file when they see some error messages. You could do something similar. Instead of (or in addition to) burn of trace files, you can insert rows in a table of logging of errors.

  • retrieve the value column access via the variable name of the column

    I need to build a function of validation with this condition:

    The data model is like this:

    We have an array of items_general, with its id and data.

    Then we have specific tables, let's say... item_especific1, item_especific2 item_especificn. They have the same as the table of the item_general pk and fk against item_general

    Each element is in one of the tables item_specific and items_general.


    Now, the validation feature: I need to check for an element, if some special columns of the item_especificx table are null and will raise an error if this occurs.

    I got the name of especific_table and the list of names of particular column stored in another table.


    I guess I can browse this list of column table to build a clause concatening Dynamics 'and' | column_name | 'is nothing', but I'm not a big fan of the dynamic sql.


    Can you think of a better solution? Any way to access the value of the column by using the column name, as if it were a varchar2 key index?




    Nope, no filter.

    When you have a funky data like that model, you're destined to dynamic sql and other assortment of headaches.

  • HP - 50g RPN - how to increase the size of the variable icon in the command screen in the RPN

    Greetings.

    How can I increase the size of the icons 'F' keys for variables in the RPN command line window?

    My reason for this is to be able to see the full name of the variable.

    Thank you.

    Edit: Perhaps sizes of keys to function 'F' is what determines the size of the variable icon. Does this mean that it cannot be increased?

    If you press SHIFT RIGHT and then press the ARROW KEY down, you can see more than 5 characters that are currently displayed for the softkey text.

    a second solution to think abou... to help the CSE function and custom designed GROBs.

    (However, take into account the current size of the police... how small it really is possible and stay legible-

    You must take account of the resolution of the screen of 50 G... it's not a 'Tablet' hi-res-like display)

    See the example on page 20-4 of the 50G users guide.

    a copy of the user guide can be downloaded here:

    http://h20000.www2.HP.com/bizsupport/TechSupport/DocumentIndex.jsp?ContentType=SupportManual & lang = to & CC = US & docIndexId = 64179 & TaskID = 120 & prodTypeId = 215348 & prodSeriesId = 3235173

    Here is the example used on page 20-4

    % HP: T (3) A (R) F (.);
    { {
    21 8 00000EF908FFF900FFF9B3FFF9A2FFF9A3FFF9A0FFF388FF GROB
    "hp"}}

    the list above on the battery... run

    MENU

    If you try to increase the amount of visible characters when running programs, you can use INFORMATION or an application like GUIPLUS located here:

    http://www.HPCalc.org/search.php?query=guiplus

Maybe you are looking for

  • SQL Server 2008 Standard Edition download

    Greetings, I want to install SQL Server 2008 Standard Edition on a dedicated server hosted remotely in a data center. I already bought a server license (DVD), however, now that I want to install it on a dedicated server, I can't use the DVD and I wou

  • Impossible to completely remove the trojan:DOS / Alureon.E from PC.

    Microsoft Security Essentials & managed to trojan:DOS security scanner / Alureon.E partially removed from the PC. PSE advise how I can totally removed?

  • control of cyclic redundancy check when you try to install the specific disk

    I installed it now mainly music programs of this pile of disc of times with no probs, I get the error message "data error (cyclic redundancy check)" on all the programs on this disc, when I put the disc in the drive of my pc seems to be a bit slower

  • Windows Movie Maker, not able to post the video

    I have a problem with the publication in 23 minutes of video! I have the same problem with Windows Movie Maker with the same the same reasons. I check everything to make sure that the files are not corrupt or missing, I check that the destination fol

  • Possible scam to support Windows 7

    I get calls from the so-called Windows 7 support on error and attempted to hack into my computer to access personal information, etc.  They will set for a sum of money.  Windows support make contact by phone from what seems to be a stranger calling o