How to check variable if chars are inside

Hi fellow sufferers :)
How can I accomplish to check if a variable a$ contains only chars like (A,B,C,D,E, ....) ... I need to make sure that my variable only contains numbers ....
Thanks in advance for your help/ideas!
Markus

function Is-Numeric ($Value) {
return $Value -match "^[\d\.]+$"
Is-Numeric 1.23
True
Is-Numeric 123
True
Is-Numeric ""
False
Is-Numeric "asdf123"
False
 Source from http://stackoverflow.com/

Similar Messages

  • How to check Variable Names

    Hi All,
    I am checking in CMOD include.  It has lot of code. Example:  When 'ZFISPER' . I think that is Variable Technical name. How to check that variable and in Which Query it is.
    Please let me know...
    Thanks in advance..
    KN

    Hello,
    You can go over into transaction code RSA1 and then on your left hand side you will be able to see lot of tabs in terms of Modeling, Administration, Transport Connection and so on.
    So go ahead and click on the tab "Transport Connection" and in the next screen you will be able to see all object types available in your environment.
    Please go ahead and open up the section "Query Elements", if you are not able to see the same, on the left under the transport connection you will see the folder "SAP Transport" and within that the option called "Object Types", just click on it once and all the object types which are available for transports will show up.
    Once you have selected Query Elements, under that you will be able to see different Query related objects and you will be having "Variable". When you drilldown on Variable folder you can double click "Select Objects" and select your appropriate variable name.
    One other way to proactively get a list of variables available in your system and to find out on which InfoObject they have been buill, please go into transaction se16 or se12 and then enter the table name RSZGLOBV.
    In this table you can get a list of all the variables along with the metadata without trying to parse through one by one variable.
    Thanks
    Dharma.

  • How to check weather BI Objectu2019s are imported and exported

    Hi to all,
    Some one has created INFOCUBE, DSO, DTP, transformation.
    My question is how I will check it, weather Objectu2019s   are imported and exported or not.
    How   to check under which request  number it have   been saved.
    Please can any one tell the step for that?
    I SHALL BE THANKFULL TO YOU FOR THIS.
    Regards
    Pavneet Rana

    Hello Pavneet,
    If you goto trans SE09/SE10--> Enter your User ID or * under user & then click on Display.
    You will be able to see all the TR's & if you drill it, you will be able to see all the objects collected under that TR.
    Hope its helps!
    Regards,
    Pavan

  • How to check whether system privilege are granted

    How to check whether system privileges like 'create session' and other ones are granted for user.
    Is there any sys table where this information is available?
    Regards - Neuron

    Keep in mind select * from dba_sys_privs where grantee = 'some-user' will give you a list of privileges granted to some-user directly. To get complete list of system privs granted to a user both directly an via roles use:
    ACCEPT USER PROMPT 'Please enter user name: '
    COLUMN PATH FORMAT A90
    SET LINESIZE 132
    SELECT  PATH,
            PRIVILEGE
      FROM  DBA_SYS_PRIVS,
              SELECT  'DIRECT GRANT' PATH,
                      '&USER' GRANTED_ROLE
                FROM  DUAL
             UNION ALL
              SELECT  LTRIM(SYS_CONNECT_BY_PATH(GRANTED_ROLE,'->'),'->') PATH,
                      GRANTED_ROLE
                FROM  DBA_ROLE_PRIVS
                START WITH GRANTEE = UPPER('&USER')
                CONNECT BY PRIOR GRANTED_ROLE = GRANTEE
      WHERE GRANTEE = GRANTED_ROLE
    /Now on top of privileges granted to a user, user also has privileges granted to PUBLIC. To get privileges user receives via PUBLIC run the above script specifying PUBLIC at the prompt.
    SY.

  • How to check wwheter two files are the same?

    Hi,
    I need to check wheter two files are the same. Their names and paths may be different. How to do that? Do u have any links / examples?
    Important notice: Files used in the application will be big (ie 1, 2gb)

    Comparing a hash, if you have to calculate it each
    time, is bound to be slower than a byte by byte, or
    character by character compare.
    This kind of comparison is used mostly in things like
    content management systems, when a new file of data
    is checked to see if it's identical to a file already
    entered, hash values being stored for each file
    already in the system.
    And comparing the hashes can only prove the files are
    different, if the hashes are equal that doesn't
    absolutely guarantee that the files are the same.
    Normally you'd confirm a matching hash by actually
    comparing file content.Depends on how good your hash is..but in general...yes. I was only saying that it's faster if you're always maintaining a has of the file.

  • How to check variable type?

    Hi,
    How to get variable type if I want to check variable
    type.which function or class do thsi.Thanks
    Mark

    I believe you use the function typeof()
    ie
    var myString:String = "test";
    trace(typeof(myString)); //should output string

  • How to create the Check box and Text Area inside the Assignment block

    Dear all,
            I am new to web UI development. my requirement is to create the Check box and Text box in the Assignment block. Can anyone help me to do this requirement.
    Thanks & Regards,
    Ashok.

    Hi,
      Please place the below code in the GET_P methods of the fields.
      For Text Area 
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_textarea.
      ENDCASE.
    For Check Box 
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_checkbox.
      ENDCASE.
    Regards,
    Lakshmi.Y

  • How to pass variable to content area from a PL/SQL procedure

    Hi,
    Can somebody tell me how to create a(Content area) folder based on a PL/SQL procedure that takes a variable as a
    parameter and returns data based on value of that parameter to the folder . Any help would be appreciated .
    Thanks and regards.
    Neeti.

    Somewhere, in one procedure, build a session identifier and save your variable there. If no session with that identifier is previously stored, it will create a new session instance with that ID for you.
    declare
    l_sess portal30.wwsto_api_session;
    varvalue number;
    begin
    varvalue := 100;
    l_sess := portal30.wwsto_api_session.load_session('MYSESSION','VARIABLES');
    l_sess.set_attribute('VAR_NAME',varvalue);
    l_sess.save_session;
    end;
    In your other procedure, or anywhere else needed within that same session, simply load the session and reference the variable. To reference the variable, use the following.
    -- assuming new procedure, so re-defining session variable and reloading session into it
    declare
    my_session portal30.wwsto_api_session;
    my_new_variable number;
    begin
    my_session := portal30.wwsto_api_session.load_session('MYSESSION','VARIABLES');
    my_new_variable := my_session.get_attribute_as_number('VAR_NAME');
    end;
    This will let you reference parameters across multiple portal applications and indirect calls.

  • How to check the checkboxes that are dynamically displayed in the browser

    Hi
    Here the requirement is ,I am dynamically diaplaying the text boxes based on the data captured from the database.Here depending upon the number characters in Database,related that much of checkboxes will display.How can i provide Javascript client event handling in this without knowing the checkbox ID'.
    Needs urgent reply,
    Regards
    Usman

    code to check all check boxes in a page.
    <body>
    <SCRIPT language=JavaScript>
    function doCheckAll()
      with (document.dam) {
        for (var i=0; i < elements.length; i++) {
            if (elements<i>.type == 'checkbox' )
               elements<i>.checked = true;
    </SCRIPT>
    <FORM  name=dam>
    <INPUT  type=checkbox value=1>
    <INPUT  type=checkbox value=2>
    <INPUT  type=checkbox value=3> <br>
    <INPUT  type=checkbox value=4>
    <INPUT  type=checkbox value=5>
    <INPUT  type=checkbox value=6> <br>
    <INPUT  type=checkbox value=7>
    <INPUT  type=checkbox value=8>
    <INPUT  type=checkbox value=9> <br>
    <INPUT onclick=doCheckAll() type=button value="Check all">
    <INPUT type=reset value="Reset">
    </FORM >
    </body>
    How you are generating check boxes? if you are generating checkboxes then you would also be generating ids for them. why cant you use them?
    Regards
    Raja

  • How to check if home directories are disabled & what else could cause this problem?

    We're having this issue with our server where some clients are having an extended authorization time to log onto our server, whether they attempt to do so via VPN or on our Network directly. This issue only seems to persist for some users and happens every time they attempt to log on. Log on can take up to 10 minutes, however, rarely ever fails.
    I was told to check size of the home directories but the other IT here said he's pretty sure he disabled the home directory things. The only reason we have these servers is so that people can dump files on them for later use or to transfer between eachother for whichever project they may be working on. How do I check whether the home directories are enabled or not, and if they are, where can I determine their size? All I am seeing in the filesystem is the login for the Admin account and the other IT's account on the server.
    What else could be causing this problem? It is not a machine-based problem as I can log into the server using their machine almost instantaneously. About half of our users are logged on instantly as well. We've been getting complaints about this for about a couple months now. It didn't seem to happen prior to February (though I can't say for sure because I started here at the end of January).
    The server is an Xserve running 10.5.x or 10.6.x (two different servers). Computers being used range from Mac OS 10.7-10.9.2. I don't believe anyone uses windows that is having an issue.

    What you need is the dba_policies
    select OBJECT_NAME, POLICY_NAME, ENABLE from dba_policies;

  • How to check Exadata plug-ins are installed and running?

    Hi ,
    I have quarter rack Exadata set-up. I wanted to check whether i have Exadata plug-ins already installed and running or not ?
    Is there any way to confirm this ? I can see grid control running on separate host and several other production dbs are registers with it for monitoring. But not sure whether Exadata db is registered to it or not ? I believe, i need to install agent and additional plug-ins to have it monitored via grid control.
    Can i check that ? Is there any way ?
    I am new to OEM and yet have not explored it.

    I haven't worked with Exadata myself but the installed plug-ins should be visible under Setup (upper-right-corner of the Grid Control Home page), Management Plug-ins.
    Eric

  • How to check whether a char string is in uppercase or not

    Hi,
    I know how to convert strings to change strings to uppercase or lowercase, but is there any function to check, beforehand, if the field is in uppercase, for instance ? The intention here is simply to spare processing in situations where the string is already in uppercase, and thus not needing any further processing (given I want to turn the string into uppercase.)
    Thanks in advance,
    Avraham

    Hi Avraham ,
    To check whether the string is in upper case or not use CA keyward.
    To check  try the following code  ---
    DATA : W_STRING(5) TYPE C,
    W_ABCDE(26) TYPE C VALUE 'abcdefghijklmnopqrstuvwxyz'.
    w_string = 'abcd'.
    IF W_STRING CA W_ABCDE.
    TRANSLATE w_string TO UPPER CASE.
    ELSE.
    MESSAGE 'It is a uppercase string' TYPE 'S'.
    ENDIF.
    Try this link  this will definitely help you -
    https://wiki.sdn.sap.com/wiki/display/ABAP/Validationofastringintermsof+case
    Regards
    Pinaki

  • How to check what oracle patches are installed

    Hello,
    I need to now what oracle patches are installed on different databases, how can achieve this?
    Regards.

    Yep:
    select ACTION_TIME,ACTION, VERSION,COMMENTS from sys.registry$history;
    ACTION_TIME ACTION VERSION COMMENTS
    25-JAN-09 07.06.05.665358 PM UPGRADE 10.2.0.4.0 Upgraded from 10.2.0.1.0
    20-MAY-09 12.23.00.924500 AM APPLY 10.2.0.4 CPUJan2009
    20-MAY-09 12.32.48.709814 AM CPU view recompilation
    Regards.
    Edited by: user6046340 on Jun 25, 2009 3:57 PM

  • How to check whether two elements are available in an array?

    For example,
    String str1="2"
    String str2="3"
    String [] str3={"2","4","8","9","3"};
    Is there any feature available by default to check whether both str1 and str2 are contained in str3?
    Or we can only compare by doing equals() and a loop?

    cross posted in the java-forums.
    Please do not cross-post questions in multiple forums. This will frustrate anyone who tries to help you only to find out later that the same answer was given hours ago in a cross-posted thread. For this reason, many volunteers here and at the other sites refuse to help repeat offenders.

  • How to check variable if present or not ?

    I have a main form and put the :global.gdate, When I call the others form
    I want to use the :global.gdate.
    I wirte a trigger "when new form instance" for each form (except main form) so I can get :global.date.
    But I can only running this program from main form, if I am running the form without the main form, the error message :global.gdate does not exists.
    Question:
    Is it posible to check if :global.gdate is exists or not ?
    maybe somthing like :
    IF get_variable(:global.gdate) IS NULL THEN --?????????
    :global.gdate := sysdate;
    END IF;

    From Oracle documentation:
    DEFAULT_VALUE built-in
    Description
    Copies an indicated value to an indicated variable if the variable's current value is NULL. If the variable's current value is not NULL, DEFAULT_VALUE does nothing. Therefore, for text items this built-in works identically to using the COPY built-in on a NULL item. If the variable is an undefined global variable, Form Builder creates the variable.
    Syntax
    PROCEDURE DEFAULT_VALUE
    (value_string VARCHAR2,
    variable_name VARCHAR2);
    Example:
    ** Built-in:  DEFAULT_VALUE
    ** Example:   Make sure a Global variable is defined by
    **           assigning some value to it with Default_Value
    BEGIN
      ** Default the value of GLOBAL.Command_Indicator if it is
      ** NULL or does not exist.
      Default_Value('***','global.command_indicator');
      ** If the global variable equals the string we defaulted
      ** it to above, then it must have not existed before
      IF :Global.Command_Indicator = '***' THEN
        Message('You must call this screen from the Main Menu');
        RAISE Form_Trigger_Failure;
      END IF;
    END;

Maybe you are looking for

  • Missing element To when using SOAP 1.2 with WS Addressing 1.0 in Response

    Hi,  I'm developing WCF using  SOAP 1.2 with WS Addressing 1.0 between Windows Server 2012 and JAVA client Oracle JAX-WS 2.1.5. The Request from the client contains the element <To>, but the Response from the Server somehow will ignore that element,

  • CUE timezone and daylight savings time

    Hi, Having issue where CUEs don't seem to be adjusting for daylight savings time. Timezone is set correct to EST but is a hour off because its daylight savings time now. The router and CUE are configured to use same NTP server and router has summerti

  • Request timed out error

    I am getting this error message. when I add "The Exception: Oracle.DataAccess.Client.OracleException Connection request timed out at ... Oracle.DataAccess.Client.OracleConnection.Open() as a temporary fix I added pool=false to the web. config file an

  • Changing Account Details

    my email account number is not #71  It is # 46 ([email protected])thank you First things, first: for your safety and protection, please never, ever include any personally identifiable information such as your real name, Skype account name, e-mail add

  • Speed up process to create web forms that put info into database

    Hi All Basically what Im trying to ask is that I have been developing jsp pages with some javabeans to insert information into databases and then to insert/retreive this information. I have been doing this by hand and it takes time even though I have