Need a data type

hi folks
i need to store numbers in this form: x,xx with two fields float precision, i need that because i need to compare float numbers to just two numbers after the come x,XX.
is there a data type for that
thx buddies

On the left side of the screen you will see the word Documentation and directly below that APIs. Click on APIs. Choose you java version (or 1.4.1 if you don't know) Scroll down to NumberFormat, click on it. Instant information.

Similar Messages

  • Help needed in data type casting

    I have a java program which will receive data and its type in the String format. During program execution, the data in the String data has to be converted into the respective data type and assigned to a variable of that data type so that it could be used in the program. Programmer may not know the type of data that the value has to be converted into.
    I really got struck up with this. This is a RMI application and one process node is sending the data to another node in the String format and the type of data it should get converted into so that it can be converted into the respective type and used for computation.
    Can you understand what I am asking for ....if you can pls help and it is highly appreciated

    I dont know whether i ahve expressed it correctly
    look at this code
    dataPacket sendtoNode = send.senDatatoNode(inputReq);
    String recnodnum = sendtoNode.nodeNum;
    String recvarnum = sendtoNode.varNum;
    String recvartype = sendtoNode.dataType;
    String recvalvalue     = sendtoNode.dataVal;
    int num;     int type;
    double result;
    // here in this case the result variable type is double
    if (recvartype.equals("int")){
              type = 1;
         result = Integer.parseInt(recvalvalue); will pose problem
         else
         if (recvartype.equals("double")){
              type = 2;
              result = Double.parseDouble(recvalvalue);
         else
         if(recvartype.equals("float")){
              type =3;
              result = Float.parseFloat(recvalvalue); will pose problem
         else
         if(recvartype.equals("Boolean")){
              if ((recvalvalue.equals("true")) || (recvalvalue.equals("TRUE")))
              type = 4;
              result = Boolean.parseBoolean(recvalvalue); will pose problem
         else
         if(recvartype.equals("char")){
              type = 5;
              result = (char)recvalvalue; will pose problem
    else
    if(recvartype.equals("String")){
         type = 6;
              result = recvalvalue; will pose problem
         else
         if(recvartype.equals("byte")){
              type = 7;
              result = Byte.parseByte(recvalvalue); will pose problem
         else
         if(recvartype.equals("long")){
              type = 8;
              result = Long.parseLong(recvalvalue); will pose problem
         else
         if(recvartype.equals("short")){
              type = 9;
              result = Short.parseShort(recvalvalue); will pose problem
         //forvarval varvalue = new forvarval();
         //varvalue.forvarval(recvartype, recvalvalue);
    // this has to be done after sorting the problem of type casting string result = recvalvalue;
    //result = value; //<this will surely give me a problem as i m assigning string to double>??
    send.host(result);
    System.out.println("result received and the result is " +recvalvalue );
    now i need to assign the converted string in to a variable and use in the compuation ..thts where the challenge n not in teh conversion process...

  • Best data type to represent a file size

    Hi All!
    I have to create a table which holds details abou the files which process on a system and maintain the file name process, size of the file in byts, full path location the file is stores etc.
    My question is what would be the best data type for a file size, currently the system proceess 4 GB files but I do not know whether this will expand so I need a data type which will be compatible for any size ther will be no decimal points involved in this.
    I hope my question is clear.
    Thank you in advance.
    Regards, Shaamil.

    user8706423 wrote:
    Hi All!
    I have to create a table which holds details abou the files which process on a system and maintain the file name process, size of the file in byts, full path location the file is stores etc.
    My question is what would be the best data type for a file size, currently the system proceess 4 GB files but I do not know whether this will expand so I need a data type which will be compatible for any size ther will be no decimal points involved in this.
    I hope my question is clear.
    Thank you in advance.
    Regards, Shaamil.Simple as Oracle did in v$datafile's BYTES field:
    SQL> desc v$datafile
    Name                                      Null?    Type
    FILE#                                              NUMBER
    CREATION_CHANGE#                                   NUMBER
    CREATION_TIME                                      DATE
    TS#                                                NUMBER
    RFILE#                                             NUMBER
    STATUS                                             VARCHAR2(7)
    ENABLED                                            VARCHAR2(10)
    CHECKPOINT_CHANGE#                                 NUMBER
    CHECKPOINT_TIME                                    DATE
    UNRECOVERABLE_CHANGE#                              NUMBER
    UNRECOVERABLE_TIME                                 DATE
    LAST_CHANGE#                                       NUMBER
    LAST_TIME                                          DATE
    OFFLINE_CHANGE#                                    NUMBER
    ONLINE_CHANGE#                                     NUMBER
    ONLINE_TIME                                        DATE
    BYTES                                              NUMBER
    BLOCKS                                             NUMBER
    CREATE_BYTES                                       NUMBER
    BLOCK_SIZE                                         NUMBER
    NAME                                               VARCHAR2(513)
    PLUGGED_IN                                         NUMBER
    BLOCK1_OFFSET                                      NUMBER
    AUX_NAME                                           VARCHAR2(513)
    FIRST_NONLOGGED_SCN                                NUMBER
    FIRST_NONLOGGED_TIME                               DATE
    FOREIGN_DBID                                       NUMBER
    FOREIGN_CREATION_CHANGE#                           NUMBER
    FOREIGN_CREATION_TIME                              DATE
    PLUGGED_READONLY                                   VARCHAR2(3)
    PLUGIN_CHANGE#                                     NUMBER
    PLUGIN_RESETLOGS_CHANGE#                           NUMBER
    PLUGIN_RESETLOGS_TIME                              DATE

  • Data type : CRMT_ORGMAN_MKT_ORG_F4_TAB

    Hi,
    I was wondering if someone can supply me with the info to create the data type: CRMT_ORGMAN_MKT_ORG_F4_TAB.  We are currently on BBCRM 3.0 and I need this data type defined.
    Thanks for you help.
    JS

    Hi,
    I was wondering if someone can supply me with the info to create the data type: CRMT_ORGMAN_MKT_ORG_F4_TAB.  We are currently on BBCRM 3.0 and I need this data type defined.
    Thanks for you help.
    JS

  • How can i build my own varient data type?

    I load dll from roper scientific ccd camera which need varient data type.The following is the example
    region.s1=0;region.s2=511;region.p1=0;region.p2=511;region.sbin=1;region.pbin=1;
    Please reply as soon as possible
    Regards

    Mark,
    With LabVIEW, you can convert your data to a variant. These functions are located in Functions»Advanced»Data Manipulation»Variant. This will convert LabVIEW's data types to Visual Basic's Variant type.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • Need to determine data type of free characteristic in multiprovider

    Hi,
    I need to determine the data type (e.g. numeric vs alpha numberic) of a free characteristic in a multiprovider.  Can this be accomplished in BEx Query Designer? 
    If not, can it be accomplished in RSA1?  How?
    Thanks,
    Kevin

    its not possible via Query designer..
    give that object name if it is infoobject then you can get via RSD1

  • Need to convert long data type to varchar2

    I need to convert a long datatype in an existing table to a
    varchar2, in either another table or view. I have a 3rd party
    application which needs to query the data in the long data type,
    but it can "handle" the long.
    What is the best way to do this? I tried to make a trigger, but
    I must be missing something. Here is the trigger.
    CREATE OR REPLACE TRIGGER "PROD".SV_GET_RTG_COMNT
    BEFORE INSERT OR UPDATE ON PROD.RELS_RTG_SEQ_COMNT
    FOR EACH ROW
    WHEN (OLD.rels_rtg_no = NEW.rels_rtg_no)
    DECLARE
    -- DECLARE VARIABLES
    RTG_COMNT_VAR VARCHAR2(32);
    RTG_COMNT_LONG LONG;
    BEGIN
    Select COMNT_TXT into RTG_COMNT_LONG
    from rels_rtg_seq_comnt;
    RTG_COMNT_VAR := 'TEXT' || substr(RTG_COMNT_LONG,1,32);
    -- If INSERTING
    Insert into SV_RTG_SEQ_COMNT (print_cd, comnt_no,
    seq_no, rtg_no, comnt_txt) values
    (:new.print_cd, :new.comnt_no, :new.seq_no, :new.rels_rtg_no,
    rtg_comnt_var);
    END;
    I tried to use the substr command on the comnt_txt in view but
    received an invalid datatype error.
    Any help would be greatly appreciated.
    Doug

    create another table with clob datatype
    1)create table clob_tab(pkval number,clob_col clob);
    2) insert into clob_tab (select pkval,to_lob(long_col) from
    long_tab);
    3) use dbms_lob package to do string manipulation using
    substr,instr functions on clob column.

  • Need to make a copy/clone of a table which has sdo_geometry data type

    Folks,
    We are running Oracle 11gr1 on Suse Linux platform.
    We have a requirement, where we need to make a copy of a table, in the same database but in a difference schema, the source table has about 130 millions rows and also has the sdo_getometry data type.
    I tried materialized view, but MV does not support sdo_geometry data type.
    According to one of my DBAs, doing it via data pump , will take few days, which is not acceptable.
    Is there a way, we can make a copy of this table in the same db ?
    Thanks
    Ashish

    Siva,
    This is not for backup purpose.
    Here is the background information on this requirement.
    I need to have a static copy of a table, which has spatial column, sdo_geometry in it.
    So we can run another application against this table, just read-only, since we need static data, data in the source table changes quite often.
    One of my DBA suggested to have another instance/database, to keep the copy of the source table, I thought idea of having another database just to keep a copy of a table is an over kill.
    That is why I had asked this question and you had provided a viable solution.
    Then we need to refresh this table , with the data (changes) from the source table, maybe once in 2- 3 weeks.
    I tried creating a Materialized view, but it does not support Spatial columns.
    So now I am trying to figure out, the most efficient way to refresh the clone table from the source table.
    Regards,
    Ashish

  • Variant to data: Need info regarding type of data

    Hello,
    What I want to do is very basic. I will acquire the image using CCD camera. The
    image is a raw data type: 2D array of type long (4 bytes per element) or integer (2 bytes per element). I can save the image even as .tiff file. Using Variant To Data, I am converting the image so that labview can handle it (I am not sure whether I really need this) before I write that data to some file and save it. I have to define data type for Variant To Data. I tried to define the data type. However, I am confused. Would anybody give me some suggestion?
    Thanks a lot,
    Dushyant

    Hrm, you'll need to be more specific about your actual question in order for us to give you a good answer, but, without more information, I'd say you should just define the type as a 2-d array of either longs or words. (i.e. get an array constant, place a numeric constant inside of it, right click the numeric constant, and select Representation->Long or Representation->Word then wire the constant to the Type input of the Variant to Data).
    If you're dealing with variants, I'd guess you are probably calling an ActiveX control or server to communicate with your camera?
    Regards,
    Ryan K.

  • Need Help with data type conversion

    Hello People,
    I am new to java, i need some help with data type conversion:
    I have variable(string) storing IP Address
    IPAddr="10.10.103.10"
    I have to call a library function which passes IP Address and does something and returns me a value.
    The problem I have is that external function call in this library excepts IP Address in form of a byte array.
    Here is the syntax for the function I am calling through my program
    int createDevice (byte[] ipAddress).
    now my problem is I don't know how to convert the string  IPAddr variable into a byte[] ipAddress to pass it through method.

    Class InetAddress has a method
    byte[]      getAddress() You can create an instance using the static method getByName() providing the IP address string as argument.

  • Need to know data type which could take the result of - data TYPE RAW.

    Hello,
    I have the following Req:
    I need to make a RFC call from one SAP system to SAP Banking Services system to retrieve Contract ID.
    But the field contract id happens to be of TYPE RAW. (16 characters)
    So my problem is - I need to know the data type could take the result (contract id) of that RFC call.
    As the declration -> data: v_con_id Type RAW --> isn't a valid syntax.
    Please help in this regard.
    Thanks
    Anoop

    Hi  
    Check this link for RAW data type
    http://help.sap.com/saphelp_46c/helpdata/en/9d/ab1b0f055b11d2806500c04fadbaa1/content.htm
    As you have mentioned about the declration ->
    data: v_con_id Type RAW --> isn't a valid syntax.
    lets try another one assign a variable to RAW data TYPE and inturn assign v_con_id to that variable.
    var_raw(16)  type RAW,
    v_con_id type var_raw(16).
    I am though not sure just try out
    Revert for clarification
    Thanks and Regards
    Srikanth.P

  • Converting VARCHAR2 to a DATE type-then need month spelled out

    I have a field that should be a DATE type, but is instead a VARCHAR2(8). The data in the VARCHAR2(8) field is displayed as what looks like a date -- EX: 09/18/09. I need to be able to convert the VARCHAR2(8) field so that it brings back the spelled out month plus the numeric day and year -- EX: September 18, 2009.
    I've been able to successfully convert a DATE type to the needed format (September 18, 2009) using the following syntax line, but now need to convert the VARCHAR2(8):
    to_char(jud_report_hear_off_v.incdate,'fmMonth dd, yyyy,') as INCDATE
    Your help is appreciated!!!

    So here is what worked.  I added this syntax line to my COMMAND in Crystal Reports:
           to_date(jud_report_hear_off_v.INCDATE, 'MM/DD/YYYY') as "INCDATE",
    Once that line was added into the COMMAND, the new format type was now a DATE and no longer a STRING (VARCHAR2).  I added INCDATE into my report and the date appeared as 09/19/2009, as it did before, but I could now select the INCDATE field via the Format Editor and see the option to select a desired Date and Time format.  I could then change the format to the choice of spelling out the month (EX:  September 19, 2009).
    Hope this helps others!  Whew!

  • Need help regarding the maximum limit for data type

    Hi,
    this is Sravan. for my application am inserting the bulk data in XML format into a column of Database table.
    the sample inserted XML data will be in format... like
    '<ACC count = "10">
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    </ACC>'
    this data in XML can have more than 1000 accounts.
    now, i need to take a Parameter value from XML node and write into a file. for this i have written a procedure by looping the Nodes from XML data and building Dynamic Query like..
    if nvl(v_int, 0) > 0 then
    v_sql := '';
         for v_count in 1..v_int
         loop
         if v_sql is null then
              v_sql := 'select extractvalue(empdetails, ''/ACC/Acc' || v_count ||'/@ac_no'')||extractvalue(empdetails, ''/ACC/Acc' || v_count
    ||'/@cn_nr'')||extractvalue(empdetails, ''/ACC/Acc' || v_count ||'/@eflag'') string from sample1';
         elsif v_sql is not null then
                   v_sql := v_sql || ' union all select extractvalue(empdetails, ''/ACC/Acc' || v_count ||'/@ac_no'')||extractvalue(empdetails, ''/ACC/Acc' || v_count
    ||'/@cn_nr'')||extractvalue(empdetails, ''/ACC/Acc' || v_count ||'/@eflag'') string from sample1';
              end if;
         end loop;
    end if;
    i will get this variable "v_int" from <ACC count = "10"> ACC count Attribute, here 10 is the value for v_int variable but in real time the variable value can be more than 1000.
    at the time of Building Dynamic Query I make using the Variable v_SQL which is of Data Type "Long",
    this variable stores dynamic query which is build at the time of executing procedure but this v_sql Variable is throughing Exception that ....
    "numeric or value error Character String Buffer is Too Small"... but Long Data type will store upto 2GB..
    this variable cant able to hold much data which is dynamically build.
    will you please help me to resolve this issue Or will u suggest me another method to pick the data from XML column.
    thanks,
    sravan.

    user11176969 wrote:
    i changed the code, now its working fine.
    direct assigning the dynamic query to a Clob variable raised error.
    for dynamic query building i used another variable and assigned this variable value to actual query variable.Nice!

  • I want to add image in column is it possible then how to add image in data base what data type we need to do

    I want to add image in column is it possible then how to add image in data base  what data type we need to give we required any casting  please show me one example
    jitendra

    Hi again,
    Several points that can help more:
    1. If you are working with Dot.Net, then I highly recommend read the first link that you got! This is nice and simple coding. Another option is this link which is even better in my opinion:
    http://www.dotnetgallery.com/kb/resource21-How-to-store-and-retrieve-images-from-SQL-server-database-using-aspnet.aspx
    2. As i mention above both link use the column's type image. There are several other option of working with Files. In most of my applications architecture I find that it is better to use a column which let us use any type of file and not an image column.
    In choosing the right column's type for your needs basically your fist question should be if if you want to store your data inside relational database environment or outside relational environment. It is a good idea to look for blogs on this issue. Next
    if you chose to store your data inside then you need to chose the right column type according to your server version. I highly recommend to look for blogs on the differences between those column's types: IMAGE, 
    Check those links:
    To BLOB or Not To BLOB: Large Object Storage in a Database or a Filesystem
    http://research.microsoft.com/apps/pubs/default.aspx?id=64525
    FILESTREAM feature of SQL Server 2008
    http://msdn.microsoft.com/library/hh461480
    FileTables feature of SQL Server 2012
    http://technet.microsoft.com/en-us/library/ff929144.aspx
    Compare Options for Storing Blobs (SQL Server)
    http://technet.microsoft.com/en-us/library/hh403405.aspx
    Binary Large Object (Blob) Data (SQL Server)
    http://technet.microsoft.com/en-us/library/bb895234.aspx
    Managing BLOBs using SQL Server FileStream via EF and WCF streaming
    * Very nice tutorial!
    http://petermeinl.wordpress.com/2012/02/20/managing-blobs-using-sql-server-filestream-via-ef-and-wcf-streaming/
    [Personal Site] [Blog] [Facebook]

  • Need substitute for INT2 data type

    Hi ,
    Currently in my program..we have used a data type INT2.
    The data type INT2 can hold only 5 characters at a time...with no commas in between and left Justified.
    Now I got a problem that..the variable which is declard with INT2 was getting populated with more than 5 charaters.
    So it gettin dump.
    Now I need to change the data type of that variable.
    I tried declaring with INT4..or Char...all these data types are nt left justified and also have commas in between.
    Please suggest a data type..which can hold morethan 5 characters..left justified n no commas in between.
    The problem..in declaring  the variable as CHAR and manipulate it as required..is the variable which Im using in my program is called from a zstructure..
    If I wanna modify it in the structure...then I need to change all the programs where the Zstructure is used..which I cant.
    So request you to help me...is there any data type..which would replace INT2 with more than 5 characters in it and also no cammas in between and should be left justified.
    Pls help.
    Regards,
    Priya

    Pure numeric fields (not c, not n, not string, etc.) DO NOT contain punctuation and decimals are implied.  The obvious replacement for INT2 is to simply declare type I.  If I needed decimals, I would convert to (15) type p decimals n.  However, your output process is what is adding the punctuation....it's absolutely not embedded in a numeric field.  You should read available helps (ABAP) on different data types.

Maybe you are looking for

  • Sharing iTunes on a Mac with VMware Fusion

    I want to share my iTunes library on the Mac side of my MacBook Pro with the Windows VMware Fusion machine. I'm hoping to just point the Windows side to my shared Mac iTunes folder. I can see the folder (under Edit...Preferences...Advanced - it shows

  • Sms-to-email problem with plugin

    Hi! 2004Q2 We have configured email-to-sms and it works good, but sms-to-email is giving us headache. This is the plugin error that we get: plugin_thread(1644): Returned from plugin; plugin returned 69 (SUBMIT_SM or SUBMIT_MULTI command failed (ESME_

  • How to I select artwork on a page to transfer to another image?

    I have created a comic character on an image and it has a white background. However when I scanned it the background is not evenly white so when I try to select the background and inverse selection it does not do a clean trace of my character. Is the

  • BAPI for reading capacity of a workplace/work center?

    Hi, I'm looking for a BAPI/RFC using SAP MII to read the capacity of a workplace/work center in a given time period (eg. one or more days/weeks/...). I would like to use the import parameters plant ( WERKS ), date from, date to, workplace/work center

  • Navigation n Search

    Hi all, 1. In runtime, i want to change the currently selected row of af:table by pressing keyboard up & down keys. but when i m trying this row is changing abruptly. how i control keyboard navigation for af:table? 2. i 've a search with 'executewith