OATS: Want to change string to int value

Hello

I got a value in the csv file to a variable of type string.

CSV:

ScnroClass Scnro_NUM

AM                    1

BM                    2

String getClassNum = eval("{{db.scnro_focus.scnro_num}}").toString ();

It will give me a result comparable to '1' or '2' in the getClassNum variable

I tried to change this variable and type int using the Number() function, but it does not change the value of int type and gives me an error "Number (String) method is undefined for the type script.

int sf_no = Number (getClass);

Can you get it someone please let me know how to change a string value to an int type.

Basically, I want to take these int of the 'Scnro_NUM' of my csv file column values in a switch statement.

Kind regards

Deepak Khari

You can also use

int number = Integer.valueOf (str);


See you soon,.

Dembélé M

Tags: Oracle Development

Similar Questions

  • Want to change the WordPad default values for font size and line spacing

    I use WordPad quite heavily because it is simple and fast.  But the new version of W - 7 seems to not allow you to change the default values for the font, size and line spacing.  The default values are not suitable for a large part of what I do and I'd like to find a way of quickly and easily, either make the changes permanent or change this to open with a single click of mouse or at most two.  Any suggestions?

    It is the "best" solution to workaround.  After you change your Default.rtf custom, simply move it to your system32 directory and add the "Default.rtf" at the end of the location of your target on the property sheet for your file WordPad.exe.

    Every time that you open its default location in the directory c:\program files\windows NT\Accessoires WordPad.exe, it defaults to now your Default.rtf custom.

  • I want to add auto IE tab firefox without the addition of manual, also I want to change the value of extensions.ietab.filterlist without classes to the topic: config

    (1) I want to change the default extensions.ietab.filterlist to mywebsite url value without having to follow several steps, each time that the user is going to hit my site, then to the users of the browser extensions.ietab.filterlist value must be added when it will hit my site. Topic: config, we can add manually, but I don't want to manually add, is it possible to automate this process.
    (2) is it possible to install the activex (extension Ietab) without clicking on add to firefox, I ask because my site is not supported in firefox because of the activex.

    (3) how to add admin privileges for activex in firefox.
    . Please help me

    I found the solution to this problem,
    (1) I added the User.js file in the default mozilla profile folder IE
    C:\Users\xpointers\AppData\Roaming\Mozilla\Firefox\Profiles\xb2fxdxi.default, I've added in user.js
    user_pref ("extensions.ietab2.filterlist", ' / ^ file:\\/\\/\\/.*\\. ") (mht) | ("mhtml) $/ http://*update.microsoft.com/* http://www.windowsupdate.com/ * http://www.UrWebsiteUrl.com/ * ");

    You can add n number of URLs to run in IETAb or IEtab2.
    User.js file overwrites the prefs.js file.

    (2) allowing to automatically add extensions to add addon, using the code and need to change the extensions.json file to the new version of firefox, for the old version of firefox need to change in the sqlite database.

  • Second row changes show that when I Browse. I want that changes to the show time.

    Mr President

    There is a problem that changes line second, display in the user interface only, when I navigate back or forward.

    I want that changes should show both.

    My code is

    First line of Code

        public void addNewPurchaseVoucher(ActionEvent actionEvent) {
            // Add event code here...
            
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();        
                   DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator");        
                   RowSetIterator rsi = dciter.getRowSetIterator();        
                   Row lastRow = rsi.last();        
                   int lastRowIndex = rsi.getRangeIndexOf(lastRow);        
                   Row newRow = rsi.createRow();        
                   newRow.setNewRowState(Row.STATUS_NEW);        
                   rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);         
                   rsi.setCurrentRow(newRow);
                   
                   BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();        
                   DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator");        
                   RowSetIterator rsi1 = dciter1.getRowSetIterator();        
                   Row lastRow1 = rsi1.last();        
                   int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1);        
                   Row newRow1 = rsi1.createRow();        
                   newRow1.setNewRowState(Row.STATUS_NEW);        
                   rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1);         
                   rsi1.setCurrentRow(newRow1); 
        }
        
    

    Code of the second row

        protected void doDML(int operation, TransactionEvent e) {       
            setAmount(getPurqty().multiply(getUnitpurprice()));
          
            if (operation == DML_INSERT) 
                       {                     
                        
                        
                           insertSecondRowInDatabase(getVid(),getLineitem(),getDebitst(),
                            (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100)); 
                           }
                          
                           if(operation == DML_UPDATE)
                           {
                               System.out.println("I am in Update with vid= " + getVid());   
                           updateSecondRowInDatabase(getVid(),getLineitem(),getDebitst(),
                             (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100)); 
                          
                             
                           }                      
                   
           
            super.doDML(operation, e);
        }
        private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4) 
                  { 
                    PreparedStatement stat = null; 
                    try 
                    { 
                      String sql = "Insert into vdet (VID,LINEITEM,DEBITST,AMOUNT) values " +
                          "('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "')"; 
                      System.out.println("sql= " + sql);   
                      stat = getDBTransaction().createPreparedStatement(sql, 1); 
                      stat.executeUpdate(); 
                    } 
                    catch (Exception e) 
                    { 
                      e.printStackTrace(); 
                    } 
                    finally 
                    { 
                      try 
                      { 
                        stat.close(); 
                      } 
                      catch (Exception e) 
                      { 
                        e.printStackTrace(); 
                      } 
                    } 
                  } 
                 
                  private void updateSecondRowInDatabase(Object value1, Object value2,Object value3, Object value4) 
                  { 
                    PreparedStatement stat = null; 
                    try 
                    { 
                      String sql = "update vdet set DEBITST='"+ value3+"',AMOUNT='"+ value4+"' where VID='" + value1 + "'";  
                      System.out.println("sql= " + sql);     
                      stat = getDBTransaction().createPreparedStatement(sql, 1); 
                      stat.executeUpdate(); 
                    } 
                    catch (Exception e) 
                    { 
                      e.printStackTrace(); 
                    } 
                    finally 
                    { 
                      try 
                      { 
                        stat.close(); 
                      } 
                      catch (Exception e) 
                      { 
                        e.printStackTrace(); 
                      } 
                    } 
                  }
    
    
    

    Concerning

    The validation on the .jspx page button, try to rerun the query after the operation of posting as:

      public String commitAction()
      {
        OperationBinding operationBinding = BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit");
        operationBinding.execute();
        DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("ViewObject1Iterator");// write iterator name from pageDef.
        iter.getViewObject().executeQuery();
        return null;
      }
    
  • Problem with string to Int conversion

    Dear friends,

    Problem with string to Int conversion

    I'll have a column where most of the values is digital. Only 4 values are not numeric.

    I have replaced the non-numeric values to numeric in order to maintain the data type.

    Grade.Grade DEAL WHEN "E4" THEN "24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' Grade.Grade OTHER END"

    This is the result as inactive

    Grade

    _0_

    _1_

    _10_

    _11_

    _12_

    _13_

    _14_

    15

    _16_

    _17_

    _18_

    _19_

    _2_

    _20_

    _21_

    _22_

    _23_

    _24_

    _3_

    _4_

    _5_

    _6_

    _7_

    _8_

    _9_

    Discount
    -            -            -

    Now I want to convert this value in digital and do some math

    So I changed the formula as below

    Cast (CASE Grade.Grade WHEN "E4" THEN "24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' Grade.Grade END as an INT. ELSE")


    Now I get the following error
    View display error
    Driver Odbc _ returned an error (SQLExecDirectW). _
    Error details
    Error codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    _State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 17001] Oracle error code: 1722, message: ORA-01722: invalid number in the OIC calling OCIStmtFetch. [nQSError: 17012] In bulk fetch failed. _ (HY000)
    SQL issued: SELECT cast (CASE Grade.Grade WHEN "E4" THEN "24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' Grade.Grade END as an int. ELSE") seen'Human Capital' 0 - Costing Manpower WHERE LENGTH (Grade.Grade CASE WHEN 'E1' THEN '20' WHEN 'E2' THEN '21' WHEN 'E3' THEN '22' WHEN "E4" THEN "23 ' ELSE Grade.Grade END) > 0 ORDER BY saw_0_

    Discount





    Could someone help me

    Concerning

    Mustafa

    Published by: Musnet on June 29, 2010 05:42

    Published by: Musnet on June 29, 2010 06:48

    Are you sure you don't have another non-digital value in your column. I want to get this filter temporarily just to check if your plaster works or not. If it works, then you can remove this filter.

  • I want to change the blackberry listfield deafault accent color

    Hello

    I want to change the accent color of blackberry deafault (blue) of listfield, here is the code sample, code works fine, I want just to customize the color of the focus of the list... Please suggest me...

    package Meidcare;

    to import java.util.Enumeration;
    import java.util.Vector;

    Import net.rim.device.api.collection.util.SortedReadableList;
    Import net.rim.device.api.system.Bitmap;
    Import net.rim.device.api.system.Display;
    Import net.rim.device.api.ui.Color;
    Import net.rim.device.api.ui.DrawStyle;
    Import net.rim.device.api.ui.Graphics;
    Import net.rim.device.api.ui.component.KeywordFilterField;
    Import net.rim.device.api.ui.component.KeywordProvider;
    Import net.rim.device.api.ui.component.ListField;
    Import net.rim.device.api.ui.component.ListFieldCallback;
    Import net.rim.device.api.ui.container.MainScreen;
    Import net.rim.device.api.ui.decor.BackgroundFactory;
    Import net.rim.device.api.util.Comparator;
    Import net.rim.device.api.util.StringUtilities;

    class SearchFieldDemoScreen extends screen
    {
    Vector drugs_list = new Vector();
    Image bitmap buttonleft, buttonright;
    CountryList _countryList;
    KeywordFilterField _keywordFilterField;
    int mHColor = - 1;

    public SearchFieldDemoScreen (vector drugs_list) {}
    This.drugs_list = drugs_list;
    this.getMainManager () .setBackground (BackgroundFactory.createSolidBackground (0xC2C2C2));

    buttonLeft = bitmap.getBitmapResource ("medical_pills.png");
    buttonRight = bitmap.getBitmapResource ("white_aero.png");

    _countryList = new CountryList();
    _keywordFilterField = new KeywordFilterField();

    Enumeration XmlDiffOperation = drugs_list.elements ();
    While (enumumeration.hasMoreElements ()) {}
    _countryList.addElement (new Country (enumumeration.nextElement (m:System.NET.SocketAddress.ToString (())));

    }

    try {}
    setTitle (_keywordFilterField.getKeywordField ());

    _keywordFilterField.setLabel("Find:");
    _keywordFilterField.setSourceList (_countryList, new Country.MyProvider ());
    _keywordFilterField.setCallback (new MyListFieldCallback());

    _keywordFilterField.SetFocus ();

    Add (_keywordFilterField);

    }
    catch (Exception e) {}
    System.out.println ("Exception in keyword filter field =" + e);
    }
    }

    class MyListFieldCallback implements {ListFieldCallback}

    {public drawListRow Sub (ListField listField, Graphics g, int index, int y, int width)}
    Object obj = ((KeywordFilterField) listField) .getElementAt (index);
    g.setColor (Color.BLACK);

    If (obj! = null & obj instanceof country) {}
    Point country = (country) obj;
    g.drawText (item.toString (), 20, y, DrawStyle.ELLIPSIS |) DrawStyle.HCENTER);
    g.drawLine (0, y-9, width, y-9);
    g.setColor (Color.WHITE);
    g.fillRect (0, y-9, width, 3); for 3-pixel thick seprater "line".
    g.setColor (Color.BLACK);

    } else if(index == 0) {}
    g.drawText ("* void *", 0, y);
    }

    }

    protected void drawFocus (Graphics graphics, boolean on) {}
    graphics.setColor (Color.RED);
    Paint (Graphics);
    }

    public Object get (ListField list, int index) {}
    Return drugs_list.elementAt (index);
    }

    public int getPreferredWidth (ListField list) {}
    Return Display.getWidth ();
    }

    public int indexOfList (String prefix, int start, ListField list) {}
    return 0;
    }
    }

    class CountryList extends SortedReadableList
    {
    Vector drugs_list = new Vector();

    public CountryList()
    {
    Super (new Country.CountryListComparator ());
    }

    Sub addElement (Object item)
    {
    try {}
    System.out.println ("Ankur");
    SearchFieldDemoScreen.ls2 = new ListStyleButtonSet();
    ((Field)) SearchFieldDemoScreen.ls2.add element;
    doAdd (element);
    }
    catch (Exception e) {}
    System.out.println ("Exception in Add item =" + e);
    }
    }

    }
    }

    class country
    {
    private String _countryName;

    public country (String countryName)
    {
    _countryName = countryName;
    }

    public String ToString)
    {
    Return _countryName;
    }

    public static class MyProvider implements {KeywordProvider}
    public String [] getKeywords (Object obj) {}
    Point country = (country) obj;
    return new String [] {item._countryName};
    System.out.println ("called MyProvider");
    Return StringUtilities.stringToWords (obj.toString ());
    }
    }

    public static class CountryListComparator implements comparator
    {
    public int compare (Object o1, object o2)
    {
    System.out.println ("CountryListComparator called in method compares");
    If (o1 == null | o2 == null)
    throw new IllegalArgumentException ("can't compare countries null");
    Return o1.toString () .compareTo (o2.toString ());
    }
    }
    }

    Thanks in advance...

    Oky I solved the problem...

    using the...

    {if (g.isDrawingStyleSet (Graphics.DRAWSTYLE_FOCUS))}

    change the accent color
    g.setBackgroundColor (0xDCDCDC);
    g.Clear ();
    draw text
    g.setFont (Resize.getSecondFont ());
    g.setColor (Color.BLACK);
    g.drawText (item.toString (), 20, y, DrawStyle.ELLIPSIS |) DrawStyle.HCENTER);
    }

    inside the drawListRow...

    Thank you all...

    ----------------------------------------------

    Press on as if you like it...

  • I want to change the account for new messages

    I have 12 mailaccounts. I want to change the standard account. It seems to me that the first account in the list is the standard account for new mail, I want the second in the list.

    Tools / account settings
    Button down "Actions account."
    as a default value

  • I want to change my email on the e-mail application.

    I just changed my email related to the mail app on my mac, and I want to set a new default value. He still has my old email synced on it, but since I deleted it, I don't want to here more. How can I get rid of him? When I click on the mail app, on the upper right corner, it says "failed to connect". It keeps telling me to check my old account, but as I mentioned earlier, I deleted it. I was able to change it on my phone, but I don't know how to do it with my mac. Help, please!

    What did you change?

    You did:

    Update your Apple ID email address

    Change your identifier Apple by following the steps below:

    1. If you are connected to iCloud on any of your devices, disconnect you.
    2. Sign in to your Apple ID account page.
    3. In the section, click on change.
    4. Under Apple ID, click on change email address.
    5. Enter the e-mail address that you want to use as your Apple ID and click on continue. A verification code will be sent to your new email address.
    6. Enter the email verification code in the fields provided and start using your Apple ID updated. Did not get the email?
    7. Once you update your Apple ID, you have to put in day your Apple ID in each of the services to which you are connected.

    Or did you create a new ID?

  • How to connect the value of the input string to numeric values

    Hello

    I'm trying to figure out how to connect the value of unique user input string to numeric values. Basically I want the user to enter the name of a gas that I have a list for (I think I put the list of gases in a table >). Then I want to match numeric values 2 'a' and 'b', according to which gas, name of the user has set. These 'a' and 'b' values will be automatically matched with the name of the gas in a list that I put. For example, hydrogen gas has the value 3 for "a" and 4 for "b. when the user puts the ' hydrogen' name in a string constant, automatically 'a' and 'b' must be issued.» I have connect a and b to a formula

    Thanks for any help

    Hello

    It is perhaps not exactly what you are looking for, but perhaps you could use the enumerated data type and the array of clusters of points (a, b).

    Look at the VI I enclose.

  • I do not understand this step "we can assume any MAC address we want by finding the key that controls the NIC we want to change.

    Hello
    anyone ever did in Winxp with success. I do not understand this step

    «We can assume that any MAC address, we want by finding the key that controls the NIC we want change, put in a value chain called "NetworkAddress" and affecting the MAC address we want to use formatted as a hexadecimal 12-digit number (example: 000000000001).»

    It is a part of the "Windows 2000/XP/Vista: The Hard Way.

    from this link
    http://www.irongeek.com/i.php?page=security/changemac

    Concerning

    original title: change MAC address

    Hello

    I suggest to refer to this thread and follow the steps in this thread and check if that helps:

    http://social.technet.Microsoft.com/forums/en/w7itpronetworking/thread/697bf48c-A226-4315-8875-2bbeddf16db2

    The steps in this link are for Windows 7 and they are valid for Windows XP.

    It will be useful.

  • A statement UPDATE changes the line if the update changes the column even value?

    HI -.

    I have a main classification and the corresponding audit table. I have a trigger. I created using the suggestion:http://www.runningoracle.com/product_info.php?products_id=211

    Now the problem that I am facing is that: if I run the same query (same value) update on the main table for n times (with the same data)... my audit table is updated with a new record every time. He is not able to determine that the value is the same.

    My goal is to load the audit table data if the value in a cell in the main table is really have changed.

    A statement UPDATE changes the line if the update changes the column even value?

    Best regards

    I have a main Table and the corresponding Audit Table. I have a trigger. I created using the suggestion:http://www.runningoracle.com/product_info.php?products_id=211

    Why?

    You try to resolve what made you what are the PROBLEM that select as the solution?

    Now the problem that I am facing is that: if I run the same query (same value) update on the main table for n times (with the same data)... my audit table is updated with a new record every time.

    Yes - it is EXACTLY what you say that you wanted to do and EXACTLY what the code does in this article.

    He is not able to determine that the value is the same.

    I think you mean that the code does NOT check if the value is the same. You can certainly change the code to do this check. But I have a question to start with your need for such a solution.

    My goal is to load the audit table data if the value in a cell in the main table is really have changed.

    OK - then modify the code to check EACH COLUMN and compare its NEW value to the OLD value and insert only the table of audit if SOME (or columns you care specifically) have changed.

    A statement UPDATE changes the line if the update changes the column even value?

    It depends on what you mean by 'change the line '. Of course to update a column with the SAME value does not change the resulting data value.

    But the physical structure of the line, the location of the pieces of line and information in the header block (YVERT, etc.) will change. And, as others have said Oracle doesn't know and doesn't care, so if the new value of a column is the same as the old value will create redo, undo and the rest.

    Start over and tell us what PROBLEM you're trying to solve. Then we can help you find the best way to solve it.

  • I want to change the language of adobe Muse. How to do this if I do not have Mac, but a windows pc?

    Hello

    I'm Dutch and is the Dutch language from my computer, but I want to change the language of my cloud of Adobe creative. I don't have a Mac. I heard that you have a button that says "preferences" and you can change your language in there. There are no button like this on another windows computer. Someone knows how to do this?

    Hi Laura,

    If you just want to change the language of Muse, you can go to preferences in Muse and pass the value of the language option.

    Kind regards

    Akshay

  • I want to change a piece of Brown fabric in an image to a mole (with specific RGB color numbers) and would it be this color specific Mole without interference from the brunette... Is this possible?

    I want to change the color of a border of cotton on a carpet sample image that is initially Brown. I need to be able to maintain the texture of cotton while being able to compose "specific" RGB color numbers Curious to know if this is possible? I can eyeball of the color and change it using "hue/saturation" but want to be able to use certain RGB numbers.

    Hi Madison,

    Exactly why do you want this fine control of color? The edges of the carpet are not the same as a logo or a piece of the judgment, its will always be carried out by the way light interacts with fibers and cause color variation. What you ask is, however, possible, but not with the RGB color space. If you want precise control of color, you must work with Lab and adjust one, b channels with curves after entering specific pantone values for the edge of the carpet. Even while Photoshop is on the single application around to support the Lab color space, you'll need at some point return to RGB and use Adobe RGB or sRGB to output and as soon as you do that your likely to get a change of color as these spaces are smaller than Lab leading to clipping. Out of curiosity, I played a bit with an image of a carpet and had no trouble get the shades I wanted. You need a mask that is easy and a layer of hue saturation adjustment with redefine enabled. By varying the hue, saturation, luminance and layer opacity virtually any color is possible. I suspect you want absolute solution, but perhaps this chart will give you an idea of what can be done if you like carpet resembling the flower beds

    Terri

  • Is the synchronization of the changes instead of possible values?

    I have the following problem:

    I have a bunch of photos taken under different conditions. Now, I've adjusted exposure and whitebalance, so that they have the same appearance.

    Now I want to change the exposure value and the whitebalance for all images of the healthy amount of spirit, but of course without syncing the value itself, as they will be again completely different.

    Is there a way to do this in Lightroom?

    was soon oskar

    Adjustments are not a feature of LR

    Not strictly true. By library Module > develop related quick adjustments can be made to WB - temperature and dyed separately, exposure, clarity and Vibrance in small or large jumps. For example, exposure can be changed by +/-0.33 stops or diaphragm openings and clarity by 5 or 20 units. Select a group of photos in the grid and the same amount of change will apply to all, regardless of their different starting points.

  • I forgot my answer to the security question, now I want to change my answer and to change their application asks me for my old answer which I forgot how can I change my answer to my security questions

    I forgot my answer to the security question, now I want to change my answer and to change their application asks me for my old answer which I forgot how can I change my answer to my security questions

    When I had the same problem, I used the solutions here If you have forgotten the answers to the security of your questions - Apple Support Apple ID

Maybe you are looking for

  • I have a HP Pavilion Entertainment PC, VM2394A #ABC model dv7 - 3060ca Windows 7 Home Premium

    I have picture but no sound when I plug in my cable HDMI to my TV, the sound comes out of my laptop but as soon as I plug in the plug HDMI the sound stops on the laptop and does not come through the TV

  • I can't hear sound on my pc

    original title: Hello,. I cannot hear sound on my pc and do not have the admin password as my brother put up... I have speakers, they worked, plugged headphones and now they are not, I tried the other socket to see if she would come up, and now I hav

  • Pilot missing nc 6400

    Missing a driver for my notebook nc6400. This is the id of the hardware ACPI\IFX0102* IFX0102 Thank you very much for the help.

  • NAT on Xbox Live with WRT54GS problem

    I have a WRT54GS v2 and I tried to solve the NAT problem I had whenever I have test Xbox Live.  I felt like I've done the research so much on this and I can not get it out of a moderate or strict NAT.  I did the port of release for the 88 and 3074-po

  • After the Windows 10 update, I have a problem with color

    I tried really a lot, but when I'm ready with an image in Lightroom (or in Photoshop) and I save in Windows, then the color is totally different. Please, can someone tell me what can be the problem? I'm getting really crazy.Thank you