Decimal value automatically converting into int

Hi,
I have a SQL column which is a string and its value is casted to have decimal value. For example 92.57
In C#, below is the code I have written to retreive the value.
command.Parameters.Add("@ProcessCompliance", SqlDbType.Decimal).Direction = ParameterDirection.Output;
 ProcessComplaincecount = command.Parameters["@ProcessCompliance"].Value.ToString());
But value is getting converted as 93 as a int. I want it as 92.57
Regards, Shreyas R S

For best results, you should post this question in the SQL development or C# forums. (This is a SharePoint forum.)
Mike Smith TechTrainingNotes.blogspot.com
Books:
SharePoint 2007 2010 Customization for the Site Owner,
SharePoint 2010 Security for the Site Owner

Similar Messages

  • Decimal format time value to convert into time (hr:min:sec)value in a graph

    I need to develop a graph in WAD, in BW7. In the graph the value must be showed as HR:MIN:SEC, which I cannot get it right.
    The keyfigure value  carries the duration(hr:min:sec) in decimal format.  In the query, I use this keyfigure for calculation. To get the time broadcasted for a week range. I get the total duration (say 507835.000). Now I need to convert this value back to hr:min:sec. I use the below formulas to get the hr, min, sec.
    D = 507835
    Val1 = D/3600
    Val2 = Frac(val1)
    Val3 = Val2 * 60
    Val4 = frac(Val3) * 60
    Hr = Val1 – Val2
    Min =  Val3 – frac(Val3)
    Sec =  Val4
    In another formula in the query I add Hr + Min/100 + Sec/10000 to get hr.minsec format.
    When I do an average on count of weeks,  this doesn’t round off correctly.
    I tried to also use the Data function TIME() which when the time is > 24 hrs changes the value.
    Lets say if it is 39:00:00, it shows value as 15:00:00 instead of keeping the value 39:00:00.
    When I used this value in the graph it did not show the HR:MIN:SEC values in the value axis instead  it showed 0.0, 0.1,….1.0. Bcoz of this the graph is blank.
    Can anybody help me to resolve this problem.
    Thanks alot
    Anima

    I checked SU01 and didn't see anything there to customize...
    In my workstation, control panel / regional and languages settings / tab regional Options / customize; my time format is HH:mm:ss; the HH has to be in capital letter to display the time in 24 hour...
    but this is strange anyway... are you reporting with web frontend or excel?

  • Illustrator image copy/paste onto the Indesign the text should automatically converted into image?

    Hi All,
    Is there options to get the image copy & paste into the Indesign, if i done manually the frames and lines stroke, colors, are coming fine, but the text object only converted the image. i want to edit text  in indesign.
    this is possible for scripting or manual?
    regards
    CSM_PHIL

    You can copy/paste from Illy to ID by selecting the text with the type tool in Illy and then pasting it into ID. You will not be able to maintain the formatting. If you want to maintain the appearance the text will be converted to outlines.
    If you need to get anything other than very simple objects from Illy to ID then you should save as AI and use the file > place command to place those objects as linked graphics into ID.
    Your closing statement is irrelevant. Whether you like it or not, this is the way it is.
    Bob

  • How can I reset the automatical convert-into-dng's-function. I prefer keeping/working my .NEF's

    Since CC 2015 my LR converts all my NEF RAW-Files into DNG's. I don't want that! I tried to change the settings - without success. Someone help me please!

    Oh gosh...! Thank you! Sometimes the solution is so easy... I combed through all settings and almost couldn't believe that I couldn't handle this... Your answer helps me a lot! Thank you!

  • How to convert String array into int.

    void getSoldSms(Vector vecSoldSms)
         String str[]=new String[vecSoldSms.size()];
         String words[]=new String[str.length]; // String array
              for(int i=0;i< vecSoldSms.size();i++)
                   str=(String)vecSoldSms.get(i);
              }               //End for
              for(int i=0;i<str.length;i++)
              words = str[i].split("\\|\\|");
              System.out.println();
              for(int j=0;j<1;j++)     
              int count[str.length]=Integer.parseInt(words[i]);
              System.out.print(count[j]*advance_count);
              } // end inner for loop
              }          //End for
         }          //End function getSoldSms
    how do i convert words which is a string array into int type. i kno string can be converted into int using interger.parseint. but wat abt string arrays??? plz help me out with the above code.

    i did tht its still giving the same errorFor Heaven's sake, what about taking a second to try to understand the code you're copying first? If you really can't fix the error yourself, you have a more serious problem than just convertingStrings to ints.
    And if you want { "1", "2", "3" } to be 123:
    StringBuffer b = new StringBuffer();
    for (int i = 0; i < array.length; i++) {
      b.append(array);
    int result = Integer.parseIn(b.toString());

  • Problem in converting into upper case urgent

    hi,
    i  working on module pool program.
    in the initial screen there is two fields one is number one is name.
    if i enter the name in the name field it is automatically converting into upper case,
    but in this case my select query is not working,how to solve this,i mean i have to take same as it is what i entered.
    kindly give me suggestion.it is urgent issue.i have to delever today.
    Thanks,
    mohan.

    hi
    in the Report to handle like this situation.. we use the extentions to the parameter  as  LOWER CASE .
    parameters p_t type char10 LOWER CASE .
    i think in the Module pool also.. we can do this in Properties of the FIELD... once check the Properties of the field... there  could be a chance.
    hi
    <b>there is field <b>checkbox called UPPER/LOWER CASE</b>at the bottom of the properties... if tick this u r porblem will be solved</b>
    Please Close this thread.. when u r problem is solved
    Reward if Helpful
    Regards
    Naresh Reddy K
    Message was edited by:
            Naresh Reddy

  • How do I stop Numbers formulas from converting (/) into (÷) for hyperlinks. Ref Ver. 3.5.2

    How do I stop Numbers formulas from converting ( / ) forward slash into (÷) divide for hyperlinks. Ref Ver. 3.5.2
    I am trying to hyperlink to a dropbox url, but the numbers formula is automatically converting / into ÷, preventing the links from working.
    Thank you.

    Hi Merritt.B,
    If you are using HYPERLINK() everything goes inside quotes:
    HYPERLINK("https://discussions.apple.com/thread/6772428","This question")
    quinn

  • Is there any function module todelete decimal values

    hi all
    is there any function module todelete decimal values not converting charcter or numeric values i want to change my value with decimals to with out decimals.
    please give me suggetion.
    Thanks
    Ramana reddy

    hi dear
    you can use type P or I
    Data W_VAL type P.
    Data W_VAL type I.
    or assigned dictionary field like Mara-MATNR as getting your value
    Rewards if Useful.

  • All page breaks are converted into section breaks

    Hi,
    In my template in ms word 2007 I have page breaks and section breaks. When I generate the output what I see is that all the page breaks are automatically converted into section breaks. Is this a bug ? Or is there a way to solve it.?
    Thanks

    Hi elic elico,
    Are your page breaks created by inserting multiple returns? If so, then the script will certainly remove them. You can "fix" this by deleting the relevant line from the text file. In general, however, it's better to control page breaks by other means.
    Thanks,
    Ole

  • Converting char to decimal value format as defined in SU3(User profile)

    Hi Techies,
    Is there any FM to convert CHAR value into Decimal fomat as defined in SU3.
    If we use, WRITE statement for printing the value in decimal format , it shows the value in decimal format correctly
    in SU3 transaction , there are three different decimal format notations which can be user specific
    I would appreciate your valuable inputs ....
    Thanks
    Santhosh

    This is my code in a generic method to transform a table into a csvrow
    when 'P'.
            tmpstr = <p_field>.
            len = strlen( tmpstr ) - 1.
            tmpstr = tmpstr+0(len).
            if <p_field> < 0.
              sign = '-'.
            else.
              sign = ' '.
            endif.
            case decimalformat.
              when 'X' or 'E'.
                split tmpstr at '.' into int frac.
                ptmp = int.
                write ptmp to cp.
                shift cp left deleting leading space.
                replace all occurrences of '.' in cp with ','.
                concatenate
                  s
                  sign
                  cp
                  frac
                  delimiter
                into s in character mode.
              when 'Y' or 'D'.
                split tmpstr at '.' into int frac.
                ptmp = int.
                write ptmp to cp.
                shift cp left deleting leading space.
                replace all occurrences of ',' in cp with '.'.
                concatenate
                  s
                  sign
                  cp
                  frac
                  delimiter
                into s in character mode.
              when ' '.
                concatenate s sign tmpstr delimiter into s in character mode.
              when others.
                concatenate s '????????' delimiter into s in character mode.
            endcase.
    where pfield is a fieldsymbol type P. (honestly ist from type any, but determined by RTTI). I needed this cause i want to format the value from "outside" without taking the user settings in consideration as write...to.. is doing.
    What i'm doing is to use the write... to... clause modifying the result (change decimal point, thousand separator and sign) according to the demanded decimal notation.
    Edited by: Rainer Hübenthal on Oct 7, 2009 4:47 PM

  • How do I convert an alpha character from a text string to its decimal value

    I am trying to find out the actual decimal value of a character in a string. So far the code below is as far as I got. I am able to get what I guess is a byte value.
    This is for a school assignment:
    The idea behind what I am trying to do is to design a hash function to store dictionary words into a bucket array hash table, without using the existing Hashtable.class
    so far this is what I can come up with to get some kind of value for each character in the string, however, what I am trying to get is the decimal value for each character.
    public static void main(String args[]){
         String word = "abcdefghijklmnopqrstuvwxyz";
         for (int i=0 ; i < word.length(); i++){
         System.out.print((word.substring(i,i+1)));
         System.out.print("\t : "+((word.substring(i,i+1))).getBytes());
    Thankyou for any replies.

    I'm not sure I completly understand your goal- what you mean by "decimal value", but, if you simply want to find the byte value of each character in a String, you would probably be better off using getBytes() in a way like this,
    byte [] bytes = string.getBytes();
    Then, if you need to map that to a charcter, you could use a for loop like
    for (int x = 0; x < bytes.length; x++) {
    table.put((char)bytes[x], bytes[x]);
    which assummes this bucket class of yours allows primitive data types like so (in Hashtable or HashMap, you would have to use a wrapper Object). I guess, my point reduces to, don't use substring and string search methods (like indexOf()), unless you have to because they are more expensive then just maping the array of bytes and chars, which seems to be what you are interested in doing.

  • Convert non-ASCII character to decimal value

    Hi all,
    I have the following problem:
    When reading a String containing the full spectrum of UTF-8 characters from a BufferedReader:
    How can I get the decimal value of the String's characters outside the ASCII range?
    When I try to do a MyBufferedReader.read(), I get the int value 65533 for these characters, instead of their real value in the UTF-8 set.
    Can anyone help?
    Thanks!
    Dre

    That's the character you get when you try to decode a character with no valid decoding. Of course there aren't any such characters for UTF-8. Therefore whatever you did, don't do that. More specifically: you've already got a String, don't do anything which involves converting it to bytes. That's completely unnecessary.
    Or perhaps the problem is the way you create the String in the first place. Who knows?

  • Windows Service - While converting into decimal its takes comma instead of decimal point

    Hi,
    We are converting hex value into decimal in windows service application ,  its working fine in almost all PC's except one.
    When we are using same code/windows service in French PC, while converting hex value into decimal its going wrong ( Ex : 1256,8904 instead of 1256.8904 )  that's is instead of decimal point takes comma. We executed same code in sample win
    form on same PC its working fine.
    actual value is "1256.8904" but its converting into "1256,8904". Can you please give me some idea how to resolve this.
    Regards,
    Prabhu.R
    Prabhu.R

    Hi,
    This forum is for System Center Service Manager. I bet you will have better luck in getting an answer if you find a forum that suits your question better. :)
    Regards
    //Anders
    Anders Asp | Lumagate | www.lumagate.com | Sweden | My blog: www.scsm.se

  • Bitstream into decimal values

    Hi,
    I have read a sound file and  converted the mono 8-bit content (The data is an array of decimal values 125,126,124,126,129.........)
    (in the sound file read.vi) into binary stream and used the data for modulation(PSK). Now after demodulation I've to convert the bit stream back into original decimal values to compare the original (baseband) power spectrum.
    How to convert the output bitstream into decimal values(like 125,126,124........).
    How to do this?
    Scan/Format string will not work here.
    I've done the decimal to binary conversion like this
    Thanks
    Celia
    Attachments:
    decimal to bitstream conversion.vi ‏36 KB

    Hello celia,
    maybe this could help you...
    Btw. I would not call it a binary stream. It's a stream of I16 values in your case!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    decimal to bitstream conversion_and_back.vi ‏40 KB

  • How to convert a number to FLOAT with 9 decimal values.

    Hi all,
    I need to convert a number like '10.02' to a floating point number with 9 decimal values like '10.022111221'. I think that the right function is TO_BINARY_FLOAT, but how can I obtain 9 decimal values? If I use the following syntax:
    select TO_BINARY_FLOAT(num) from table
    I obtain a floating point values with a variable number of decimal numbers after the ".", instead I need 9 number after ".".
    Regards,
    Maurizio.

    Hi,
    the number I need to select is the result of a product, for example:
    select (Num_A * Num_B) from Table;
    Num_A has 2 decimal numbers, like 12.01 and Num_B could be: 12.111111111.
    Now, Num_A * Num_B = 653.999999994
    but I issue:
    select TO_BINARY_FLOAT(54.00 * 12.111111111) from Table
    I obtain:
    654, a rounded value, but I need 653.999999994.

Maybe you are looking for

  • ITunes freezes whenever I try to play any videos

    iTunes 10.7 Windows 8 64 bit The moment I try to play a video iTunes locks up. I have to "end task" in the task manager. The only way it will work is in iTunes Safe mode. I tried disabling Direct3d accel in Quicktime -- did not work. I completely uni

  • Enhacement  for  Purchase order creation (Service Item)

    Dear All, While creating the purchase order for service items , the base value for calculating the tax must be a value of a pricing condition type. Can anyone advice how to link the pricing and tax details of a service item. Thanks Ravindra Suvarna

  • Adobe Air and iOS 7 microphone prompt issue

    I have read numerous posts that the latest versions of Adobe Air 3.9 Beta is supposed to resolve the issue of iOS 7 apps prompting for microphone access. However, I am still encountering this error. Am using Adobe AIR: v3.9 Beta Adobe Flash CC: v13.0

  • Connection to DB

    Hi, only sys as sysdba can connect to Database in sqlplus, any other user (scott for exemple) can not connect even if they have connect and create session granted to them. No error message just hang up , we stay the hours without connecting. Any idea

  • CDDB Error - Please Help!

    I can't get track names to show up - i get a CDDB Error - HTTP Processing Error. I'm on a wireless broadband connection from home so i'm not using a LAN or have any proxy settings. I'm running McAfee Security, but i tried disabling my firewall and th