Remove decimal & padding 0

using Oracle 9i
I need to remove the decimal from a given number
123.45 should show as 12345 i tried this
create table tmpTBL
as
select 25.750 amt from dual
union all
select 12 from dual;
select replace(amt,'.',null) from tmpTBL
this works fine, but what if the col has amouts without decimals
123 should show as 12300
if decimal is there then remove it
else pad the number with '00'
how do i achieve this?
Thanks

Why not simply multiply by 100 ?Perhaps because that assumes no more than 2 decimal places?
SQL> ed
Wrote file afiedt.buf
  1  with t as (select 25.750 as num from dual union all
  2             select 12 from dual union all
  3             select 123 from dual union all
  4             select 123.4 from dual union all
  5             select 123.45 from dual union all
  6             select 123.456 from dual)
  7  -- end of test data
  8  select num*100 as num_x_100
  9        ,replace(to_char(num, '999999.99'),'.') as num_stripped
10* from t
SQL> /
NUM_X_100 NUM_STRIPP
      2575      2575
      1200      1200
     12300     12300
     12340     12340
     12345     12345
   12345.6     12346
6 rows selected.
SQL>

Similar Messages

  • To Remove decimal digit in number field

    Hi experts
    any one can tell me the function in Crystal Report for removing decimal digits in a number type field. like field value is 34.00 should be 34.
    Regards
    Gorge

    Hi,
    use "round(value,dec places)" formula that is there in  functions in crystal report.
    Rgds,
    Premraj

  • Removing decimal in mapping

    Hi,
    How do I remove decimal from float (source) to unsigned integer (target) in graphical mapping?
    For eg:
    Source = 1500.23
    Target = 150023
    Reg,
    Shobhit

    If you want a quick way of just letting numbers to pass, use:
    return a.replaceAll([^0-9], "");
    in a UDF.
    Regards,
    Henrique.

  • Remove decimal points

    Hi,
    how to remove decimal points from all the columns in table in obiee
    thanks

    hi
    add one decimal point
    is this the same? or any?
    Cheers

  • Captivate 4 Possible to remove borders/padding around published project?

    Greetings,
    I am working with Captivate 4 and publishing to a SCORM 1.2 compliant LMS. I would like to publish a project without having the borders/padding surrounding the project files. Is this possible? If so, where would I look to find instructions to do this?
    When published in our LMS, the LMS generates a window of a fixed sixe. This is set in the LMS itself and can be changed in the LMS. The goal being to remove browser controls and scroll bars from the user’s point of view when they launch a lesson showing only the lesson.
    In previous versions of Captivate (2 and 3) I was able modify the SCORM.htm file in such a way that I could remove any padding around published project files. The SCORM.htm file used a table to center the Captivate SWF files in the users screen. I could edit this file and use absolute positioning to eliminate (the table tags) “dead space” around a project swf file.
    Doing this in Captivate 4 (editing Custom.htm and Default.htm) does not seem to have the same effect. (In fact it seems to have no affect (good or bad) at all.
    Has anyone had any success in doing this?
    Also, has anyone used the new Captivate 5 yet? Does it have the same presentation limitations as Captivate 4?
    Thank you,
    TPK

    TPK,
    This worked perfect.  The only problem that I have is that it still leaves a small ribbon of white at the top and the bottom of the window.  Any idea how to remove that?
    Here is the current HTM text
    <!-- Copyright [2008] Adobe Systems Incorporated.  All rights reserved -->
    <!-- saved from url=(0013)about:internet -->
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>workers_comp</title>
      <script src="standard.js" type="text/javascript"></script>
      <script src="SCORM_support/scorm_support.js"></script>
      <script type="text/javascript" language="JavaScript">
       // set document.domain property here, if it works for your environment/SCORM implementation
       // document.domain="";
       var g_intAPIType = 0;
       // Hook for Internet Explorer
       if ((navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) || g_intAPIType == -1)
        g_intAPIType = 0;
        document.write('<script language=\"VBScript\"\>\n');
        document.write('On Error Resume Next\n');
        document.write('Sub Captivate_FSCommand(ByVal command, ByVal args)\n');
        document.write('Call Captivate_DoFSCommand(command, args)\n');
        document.write('End Sub\n');
        document.write('</script\>\n');
        document.write('<script language=\"VBScript\"\>\n');
        document.write('On Error Resume Next\n');
        document.write('Sub Captivate_DoExternalInterface(ByVal command, ByVal parameter, ByVal value, ByVal variable)\n');
        document.write('Call Captivate_DoExternalInterface(command, parameter, value, variable)\n');
        document.write('End Sub\n');
        document.write('</script\>\n');
       } else {
        g_intAPIType = 1;
       var strURLFile = "Enhanced_Authorization_Integration.swf";   // Name of the flash file
       var intIntervalSecs = 1;    // Number of seconds to wait for SCORM API to load
       var g_intAPIOrder = 0;     // Way to search for API object (0 - starts with bottom up; 1 - starts top down)
       var strURLBase = "";
       var strURLParams = "";
       var strURLFull = document.location + "";
       var intTemp = strURLFull.indexOf("#");
       if (intTemp == -1)
        intTemp = strURLFull.indexOf("?");
       if (intTemp > 0)
        strURLParams = strURLFull.substring(intTemp + 1, strURLFull.length);
       var strTemp = location.protocol.toUpperCase();
       if (strTemp.indexOf("FILE") == -1)
         var intTemp = location.pathname.lastIndexOf("/");
       else
         var intTemp = location.pathname.lastIndexOf("\\");
       if (intTemp != -1)
         strURLBase = location.protocol + "//" + location.host + location.pathname.substring(0, intTemp + 1);
       else
         strURLBase = location.protocol + "//" + location.host + location.pathname;
       strURLParams = (strURLParams==unescape(strURLParams)?escape(strURLParams):strURLParams);
       strURLParams = (strURLParams==""?"":"?") + strURLParams;
       function Finish()
        if ((isAPI()) && (g_bFinishDone == false))
         (g_zAPIVersion=="0.2"?g_objAPI.LMSCommit(""):g_objAPI.Commit(""));
         g_bFinishDone = (g_zAPIVersion=="0.2"?g_objAPI.LMSFinish("") == "true":g_objAPI.Terminate("") == "true");
        return (g_bFinishDone + "" ) // Force type to string
       if(g_intAPIType==0)
        // Detect Internet Explorer
        var g_bIsInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
        // Handle fscommand messages from a Flash movie
        function Captivate_DoFSCommand(command, args)
         var CaptivateObj = g_bIsInternetExplorer ? Captivate : document.Captivate;
         var strFSArgs = new String(args);
         var strFSCmd = new String(command);
         var strErr = "true";
         var strFSArg1, strFSArg2, strFSArg3
         var intFSDelimiter = strFSArgs.indexOf("|");
         if (intFSDelimiter > -1)
          strFSArg1 = strFSArgs.substr(0, intFSDelimiter);  // Name of data element to get from API
          var strFSTemp = strFSArgs.substr(intFSDelimiter + 1);
          intFSDelimiter = strFSTemp.indexOf("|");
          if(intFSDelimiter > -1)
           strFSArg2 = strFSTemp.substr(0, intFSDelimiter); // Value
           strFSArg3 = strFSTemp.substr(intFSDelimiter + 1); // Variable
          } else {
           strFSArg2 = strFSTemp;
         } else {
          strFSArg1 = strFSArgs;
         // do nothing, if SCORM API is not available
         if (!isAPI()) return;
         if ( strFSCmd == "LMSInitialize" || strFSCmd=="Initialize")
          CaptivateObj.SetVariable(strFSArg3, eval('g_objAPI.' + strFSCmd + '(\"\");'));
         } else if ( strFSCmd == "LMSSetValue" || strFSCmd=="SetValue") {
          strErr = eval('g_objAPI.' + strFSCmd + '(\"' + strFSArg1 + '\",\"' + strFSArg2 + '\");');
          CaptivateObj.SetVariable(strFSArg3, strErr);
         } else if ( strFSCmd == "LMSFinish" || strFSCmd=="Terminate") {
          g_bFinishDone = eval('g_objAPI.' + strFSCmd + '(\"\");')
          strErr = g_bFinishDone;
          CaptivateObj.SetVariable(strFSArg3, g_bFinishDone);
         } else if ( strFSCmd == "LMSCommit" || strFSCmd=="Commit") {
          strErr = eval('g_objAPI.' + strFSCmd + '(\"\");');
          CaptivateObj.SetVariable(strFSArg3, strErr);
         } else if ((strFSArg2) && (strFSArg2.length > 0)) {
          if(strFSCmd=="LMSGetLastError")
           strErr = eval('g_objAPI.' + strFSCmd + '();')
           CaptivateObj.SetVariable(strFSArg3, strErr);
          } else {
           strErr = eval('g_objAPI.' + strFSCmd + '(\"' + strFSArg1 + '\");')
           CaptivateObj.SetVariable(strFSArg3, strErr);
         } else if (strFSCmd.substring(0,3) == "LMSGet") {
          strErr = "-2: No Flash variable specified"
         return strErr;
        function Captivate_DoExternalInterface(command, parameter, value, variable)
         var CaptivateObj = g_bIsInternetExplorer ? Captivate : document.Captivate;
         //alert("command  " + command + " ;parameter " +parameter+ " ;value " + value + " ;variable " + variable );
         //var strFSArgs = new String(args);
         var strFSCmd = new String(command);
         var strErr = "true";
         var strFSArg1, strFSArg2, strFSArg3;
         strFSArg1 = parameter;
         strFSArg2 = value;
         strFSArg3 = variable;
         /*var intFSDelimiter = strFSArgs.indexOf("|");
         if (intFSDelimiter > -1)
          strFSArg1 = strFSArgs.substr(0, intFSDelimiter);  // Name of data element to get from API
          var strFSTemp = strFSArgs.substr(intFSDelimiter + 1);
          intFSDelimiter = strFSTemp.indexOf("|");
          if(intFSDelimiter > -1)
           strFSArg2 = strFSTemp.substr(0, intFSDelimiter); // Value
           strFSArg3 = strFSTemp.substr(intFSDelimiter + 1); // Variable
          } else {
           strFSArg2 = strFSTemp;
         } else {
          strFSArg1 = strFSArgs;
         // do nothing, if SCORM API is not available
         if (!isAPI()) return;
         if ( strFSCmd == "LMSInitialize" || strFSCmd=="Initialize")
          //CaptivateObj.SetVariable(strFSArg3, eval('g_objAPI.' + strFSCmd + '(\"\");'));
          CaptivateObj.SetScormVariable(strFSArg3,eval('g_objAPI.' + strFSCmd + '(\"\");'));
         } else if ( strFSCmd == "LMSSetValue" || strFSCmd=="SetValue") {
          strErr = eval('g_objAPI.' + strFSCmd + '(\"' + strFSArg1 + '\",\"' + strFSArg2 + '\");');
          //CaptivateObj.SetVariable(strFSArg3, strErr);
          CaptivateObj.SetScormVariable(strFSArg3, strErr);
         } else if ( strFSCmd == "LMSFinish" || strFSCmd=="Terminate") {
          g_bFinishDone = eval('g_objAPI.' + strFSCmd + '(\"\");')
          strErr = g_bFinishDone;
          //CaptivateObj.SetVariable(strFSArg3, g_bFinishDone);
          CaptivateObj.SetScormVariable(strFSArg3, g_bFinishDone);
         } else if ( strFSCmd == "LMSCommit" || strFSCmd=="Commit") {
          strErr = eval('g_objAPI.' + strFSCmd + '(\"\");');
          //CaptivateObj.SetVariable(strFSArg3, strErr);
          CaptivateObj.SetScormVariable(strFSArg3, strErr);
         } else if ((strFSArg2) && (strFSArg2.length > 0)) {
          if(strFSCmd=="LMSGetLastError")
           strErr = eval('g_objAPI.' + strFSCmd + '();')
           //CaptivateObj.SetVariable(strFSArg3, strErr);
           CaptivateObj.SetScormVariable(strFSArg3, strErr);
          } else {
           strErr = eval('g_objAPI.' + strFSCmd + '(\"' + strFSArg1 + '\");')
           //CaptivateObj.SetVariable(strFSArg3, strErr);
           CaptivateObj.SetScormVariable(strFSArg3, strErr);
         } else if (strFSCmd.substring(0,3) == "LMSGet") {
          strErr = "-2: No Flash variable specified"
         return strErr;
      </script>
    </head>
    <body  bgcolor="#F1F4F5" onunload="Finish();">
         <!-- <center> -->
      <div id="CaptivateContent" style="position:absolute; top: 0px; left: 0px;">
      </div>
      <layer id="NS_dynamic" name="NS_dynamic">
      <script type="text/javascript">
        var tempso = new SWFObject("SCORM_support/scorm_support.swf", "scorm_support", "2", "2", "8", "#CCCCCC");
        tempso .addParam("quality", "high");
        tempso .addParam("id", "scorm_support");
        tempso .addParam("bgcolor","#FFFFFF");
        tempso .addParam("menu", "false");
        tempso .addParam("movie", "SCORM_support/scorm_support.swf");
        tempso .setAttribute("redirectUrl", "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash");
      </script>
      <noscript>
       <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
        codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
        width="2" height="2" id="scorm_support" align="">
        <param name=movie value="SCORM_support/scorm_support.swf"> <param name=quality value=high> <param name=menu value=false> <param name=bgcolor value=#FFFFFF>
        <embed src="SCORM_support/scorm_support.swf" quality=high bgcolor=#FFFFFF  width="2" height="2" name="scorm_support" align=""
         type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer">
        </embed>
       </object>
      </noscript>
      </layer>
      <script type="text/javascript" language="JavaScript">
       var timeCurrent_int = new Date().getTime();
       var timeLimit_int = new Date().getTime() + (intIntervalSecs * 1000);
       // This simply loops for a set period of time, waiting for the API to
       // load and/or be found.  A better solution would be to use setInterval
       // and on the timeout, redirect or load the resulting Captivate file.
       while((g_objAPI == null) && timeCurrent_int < timeLimit_int)
        g_objAPI = getAPI(g_intAPIOrder);
        timeCurrent_int = new Date().getTime();
       if(g_objAPI != null)
        strURLParams += (strURLParams==""?"?":"&") + "SCORM_API=" + g_zAPIVersion + "&SCORM_TYPE=" + g_intAPIType;
       //document.write('<center>');
       //document.write('<table border="0" cellpadding="7" cellspacing="7"> \n');
       //document.write('  <tr>  \n');
       //document.write('    <td align="middle">');
       document.write('<div id="flash" style="position:absolute; top:0px; left:0px;"> \n');
       var so = new SWFObject(strURLFile + strURLParams, "Captivate", "992", "625", "9", "#CCCCCC");
        so.addParam("quality", "high");
        so.addParam("name", "Captivate");
        so.addParam("id", "Captivate");
        so.addParam("wmode", "window");
        so.addParam("bgcolor","#FFFFFF");
        so.addParam("menu", "false");
        so.addVariable("variable1", "value1");
        so.setAttribute("redirectUrl", "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=S hockwaveFlash");
        so.write("CaptivateContent");
       document.write(' </div> \n');
       //document.write('</td> \n');
       //document.write('  </tr> \n');
       //document.write('</table> \n');
       //document.write('</center>');
      </script>
      </center>
    </body>
    </html>

  • To remove decimal places and round

    hi all ,
    select       (sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) <> upper('Top')) then
                (((((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)*94)/2000)   )
                 when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
             (   ((nvl(H.CLASS_V_CEMENT,0)*94)/2000)   ) 
            when F.ITEM_UOM =  'Pound' then
          CEIL(  ROUND((((((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100)))/2000
           end)*(j.opn_value/2))  SUM_MAT_ACT_TON ,--------transport
                       sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) <> upper('Top')) then
                ((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)
          when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
                nvl(H.CLASS_V_CEMENT,0)
            when F.ITEM_UOM =  'Pound' then
                ROUND(((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )/P.ATTRIBUTE5)
       end) SUM_sload ,    ----sload
       sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) <> upper('Top')) then
                ((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)
         -- when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
              --  nvl(H.CLASS_V_CEMENT,0)
            when F.ITEM_UOM =  'Pound'  and F.BLEND <> 'PH'then
                ROUND(((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )/P.ATTRIBUTE5)
       end) BLENDING
      ,e.opn_job_desc
         FROM xxnp_opn_joblog_001 E,
              XXNP_OPN_JOBLOG_EST_002   F,
              XXNP_OPN_JOBLOG_STAGE_002 G,
              XXNP_OPN_JOBLOG_SLURRY_003 H,
        XXNP_OPN_JOBLOG_RES_005 J,
         MTL_SYSTEM_ITEMS_B P
          WHERE E.OPN_JOB_DESC   = 'K/D/SP158/SA399/1338/D/0510/1' AND
            E.MANUAL='N'
       and J.opn_resource_desc='4X4  PICK-UP OR LIGHT VEHICLES'
        AND E.OPN_JOBLOG_001_ID = J.OPN_JOBLOG_001_ID
         and F.INVENTORY_ITEM_ID=P.INVENTORY_ITEM_ID
           AND p.ORGANIZATION_ID='103'
          AND E.OPN_JOBLOG_001_ID = G.OPN_JOBLOG_001_ID
            AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
            AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
            AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
            AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
                                    GROUP BY E.OPN_JOB_DESC,j.opn_value
    o/p  i am getting
    SUM_MAT_ACT_TON      SUM_SLOAD                         BLENDING                                   OPN_JOB_DESC
    11587.7954154787         1957.62401925833               1454.62401925833                       K/D/SP158/SA399/1338/D/0510/1
    well can anyone guide me on  obtaining the following output (to remove decimal places and round )
    SUM_MAT_ACT_TON      SUM_SLOAD                         BLENDING                                   OPN_JOB_DESC
    11588                           1958                                      1455                                          K/D/SP158/SA399/1338/D/0510/1thanking in advance
    Edited by: makdutakdu on May 25, 2010 12:48 PM

    select      round( (sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3))  upper('Top')) then
                (((((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)*94)/2000)   )
                 when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
             (   ((nvl(H.CLASS_V_CEMENT,0)*94)/2000)   ) 
            when F.ITEM_UOM =  'Pound' then
          CEIL(  ROUND((((((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100)))/2000
           end)*(j.opn_value/2)))  SUM_MAT_ACT_TON ,--------transport
                       round(sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3))  upper('Top')) then
                ((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)
          when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
                nvl(H.CLASS_V_CEMENT,0)
            when F.ITEM_UOM =  'Pound' then
                ROUND(((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )/P.ATTRIBUTE5)
       end)) SUM_sload ,    ----sload
       round(sum(case when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3))  upper('Top')) then
                ((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD)
         -- when (F.ITEM_UOM = 'Cubic Feet' and upper(substr(H.SLURRY_TYPE,1,3)) = upper('Top')) then
              --  nvl(H.CLASS_V_CEMENT,0)
            when F.ITEM_UOM =  'Pound'  and F.BLEND  'PH'then
                ROUND(((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )/P.ATTRIBUTE5)
       end)) BLENDING,
       e.opn_job_desc
         FROM xxnp_opn_joblog_001 E,
              XXNP_OPN_JOBLOG_EST_002   F,
              XXNP_OPN_JOBLOG_STAGE_002 G,
              XXNP_OPN_JOBLOG_SLURRY_003 H,
        XXNP_OPN_JOBLOG_RES_005 J,
         MTL_SYSTEM_ITEMS_B P
          WHERE E.OPN_JOB_DESC   = E.OPN_JOB_DESC  AND
            E.MANUAL='N'
       and J.opn_resource_desc='4X4  PICK-UP OR LIGHT VEHICLES'
        AND E.OPN_JOBLOG_001_ID = J.OPN_JOBLOG_001_ID
         and F.INVENTORY_ITEM_ID=P.INVENTORY_ITEM_ID
           AND p.ORGANIZATION_ID='103'
          AND E.OPN_JOBLOG_001_ID = G.OPN_JOBLOG_001_ID
            AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
            AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
            AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
            AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
                                    GROUP BY E.OPN_JOB_DESC,j.opn_value

  • A query on removing additionally padded zeroes from the pernr.

    Hi ,
    How can i remove the padded zeroes from the pernr, Ex pernr is 8 chars and if pernr has 6 chars it has to remove appended 2 zeroes from the left and should only print the 6 chars with no appended zeroes
    Thanks

    Hi Khaleel,
    Use FM <b>CONVERSION_EXIT_ALPHA_OUTPUT</b>
    Reward if useful.
    Thanks
    Aneesh.

  • Remove decimal from Line Chart

    I am using custom XML for line chart to control thresholds. On X axis , I want to specify % instead of decimal value. How can I achieve it?
    I changed the below :
    <format><![CDATA[{%Name}{enabled:True} - {%Value}{numDecimals:0}%]]></format>
    But it does not work. Can someone help me?

    Ok, here is the entire custom XML from one of my charts. You will notice that the definitions for the X and Y axis are not in the <data_plot_settings> tag, but are in the <chart_settings> tag which is above the data_plot_settings.
    <?xml version = "1.0" encoding="utf-8" standalone = "yes"?>
    <anychart>
      <settings>
        <animation enabled="false"/>
        <no_data show_waiting_animation="False">
          <label>
            <text></text>
            <font family="Verdana" bold="yes" size="10"/>
          </label>
        </no_data>
      </settings>
      <margin left="0" top="" right="0" bottom="0" />
      <charts>
        <chart plot_type="CategorizedVertical" name="chart_3053317050568022">
          <chart_settings>
            <title enabled="False" />
            <chart_background enabled="false" />
            <data_plot_background enabled="false" />
            <axes>
              <y_axis >
                <scale   mode="PercentStacked" maximum="100" major_interval="20" minor_interval="20" />
                <title enabled="false" />
                <labels enabled="true" position="Outside">
                  <font family="Tahoma" size="10" color="0x000000" />
                  <format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}%]]></format>
                </labels>
                <major_grid enabled="False"/>
                <minor_grid enabled="False"/>
                <minor_tickmark enabled="false" />
                <line enabled="false" />
                <zero_line enabled="false" />
              </y_axis>
              <x_axis>
                <scale  mode="PercentStacked"    />
                <title enabled="false"/>
                <labels enabled="true" position="Outside" display_mode="Stager">
                  <font family="Tahoma" size="10" color="0x000000" />
                  <format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>
                </labels>
                <major_grid enabled="False" />
                <minor_grid enabled="False" />
                <major_tickmark enabled="false" />
                <minor_tickmark enabled="false" />
                <line enabled="false" />
                <zero_line enabled="false" />
              </x_axis>
            </axes>
            <legend enabled="false" />
          </chart_settings>
          <data_plot_settings enable_3d_mode="false" >
            <bar_series style="Default">
              <tooltip_settings enabled="true">
                <format><![CDATA[{%CategoryName}   {%SeriesName} - {%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,} - {%YPercentOfCategory}{numDecimals:1,decimalSeparator:.,thousandsSeparator:\,}%]]></format>
                <font family="Tahoma" size="10" color="0x000000" />
                  <position anchor="Float" valign="Top" padding="10" />
              </tooltip_settings>
              <label_settings enabled="true" mode="Outside" multi_line_align="Center" rotation="0">
                <format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,} - {%YPercentOfCategory}{numDecimals:1,decimalSeparator:.,thousandsSeparator:\,}%]]></format>
                <background enabled="false"/>
                <position anchor="Center" valign="Center" halign="Center"/>
                <font family="verdana_embed_tf" size="10" color="0x000000" />
              </label_settings>
              <bar_style>
              </bar_style>
              <marker_settings enabled="True" >
                <marker type="None" />
              </marker_settings>
            </bar_series>
          </data_plot_settings>
    &P7_CHART_DATA.
        </chart>
      </charts>
    </anychart>

  • Remove decimal & zeros in variable

    Hi,
    How to remove zero & decimal point in variable
    for eg.
    insted 5.0000 it should priint 5
    Thanks

    Dear Imran,
    Please use this code and you can vary the difference.
    data: menge type MENGE_D,
          con type i,
          con1 type char5,
          con2 type p,
          con3 type n.
          menge = '100.00'.
          move menge to con.
          move menge to con1.
          move menge to con2.
          move menge to con3.
         con1 = menge.*
         con2 = menge.*
         con3 = menge.*
          write: 'i', con,
                 'char', con1,
                 'p', con2,
                 'n', con3.
    i think this will be help ful to you
    Regards,
    Kiran Kumar

  • Remove decimal out of an equation to send to a payment gateway

    i have a value that currently has shows a decimal
    @$amount = $_POST['amount'];
    i need the decimal to show until the variable $amount is sent to the payment gateway
    what is the best way to remove the decimal from the variable
    so a value of e.g
    250.59
    will be sent as 25059
    thanks

    would multiplying by 100 also work?
    $amount = "250.59";
    echo $amount*100;
    // 250.59*100 displays 25059
    $amount = str_replace(".","",$amount);
    echo $amount*100;
    // 25059*100 displays 2505900
    Your original question specifically asked how to remove a decimal, not how to multiply a variable by 100.
    best,
    Shocker

  • Remove Decimal Zeros

    Hello,
    I managed to remove the default Zeros in the "Net_Price" and "Quantity" field by using the "Set_attribute_null" method.
    But, after entering the value into the field and clicking on the button to execute the BAPI, it is inserting decimal zeros again after the values. I want to remove this decimal zeros. Is there any way of doing this? I would greatly appreciate your help.
    Regards,
    Gopal.

    Hi Gopal ,
    there is a pretty print option for this . u cn  set special formatting properties using the context editor or the methods GET_ATTRIBUTE_FORMAT_PROPS and SET_ATTRIBUTE_FORMAT_PROPS of IF_WD_CONTEXT_NODE_INFO.
    the attribute formatting can be :
    1 Display leading zeros
    2 Position of the leading sign
    3 Input Compression
    4 Time output format
    u wud like to see more on the SAP online help :
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/3a/2232666aeb45f4b759848a4caf9c8b/content.htm
    regards,
    amit

  • Remove decimal from displaying in prices?

    I would like to remove the decimal from my product price so it will be displayed Kr.390  or my first choice if anyone knows how to solve it is Kr. 390,-
    Costs are now presented Kr.290,00 that is not correctly.
    Hope someone has a solution to this ...

    Here's a link that contains a simple code snippet that will do this for you - http://www.twoblokeswithapostie.com/blog/2013/05/27/eliminating-decimals-product-prices-bu siness-catalyst/
    You may have to replace . with , in price = price.split("."); if your prices have a comma in them instead of a dot.
    Cheers,
    Mario

  • Query to remove decimal point

    Hi all,
    I have a table A, in which there is a column currency with integer values having decimal point, i have to just remove the decimal and keep the number as it is.
    Ex:- A number 23.45 should be 2345
    A number 17.9 should be 179
    I have to do this for all the currency values of the table A.
    Can someone kindly help me with a query.
    regards,

    Hi,
    user10243788 wrote:
    Thank you all for replying,
    The problem is that there are different rows in table A, i.e many values, so i think we would have to pass this value as variable in runtime.Sorry, I don't understand.
    What value do you think you have to pass as a variable? The decimal point character ('.' in America, ',' in Germany)? The number of decimal places? Some value, such as 175?
    select to_number(replace (1.23, '.')) from dual;
    or
    SELECT REPLACE (crncy, '.') AS crncy_w_o_dot
    FROM table_x;
    how can i use the above query like a loopAny query is like a loop; it finds each row, and does the same sort of thing to each one.
    i.e if i have many values like below in the column currency, how can i change them all.Are you saying you have different columns that need to be transformed?
    If so, the answer depends on what your data is like, what results you want, and what version of Oracle you're using..
    If what you want to do is simple, and the number of columns isn't to big, the best thing is to repeat the formula for every column.
    Other options are likely to be slower.
    You could write a user-defined fucniton to do the transformation.
    You could unpivot the table, so that all the columns to be transformed become one column. You could then pivot the results back to the original number of columns, if necessary.
    17.5
    23.456
    89.9343
    43.98121thanks again for your help,Is this your sample data? It looks like just one column. Post some sample data as CREATE TABLE and INSERT statements.
    What are the results you want from that data? If you need to pass some parameter to the query, give a couple of examples of different parameters and the different results they produce given the same sample data.
    Whenever you have a question, say what version of Oracle you're using.
    Edited by: Frank Kulash on Jul 13, 2010 11:05 AM

  • Javascript - Formatting Return Values & Removing Decimal in Dollar Amount

    Hi, I'm looking for some help. I'm new to Javascript and working off my limited knowledge. Below is one item I need help figuring out.
    ---JavaScript Registration Fee---
    I'm using the following document level Javascript in Acrobat to calculate the pro-rated registration fee based on the current month:
    **Note: Text Field "Today" is using the following value:
    var f = this.getField("Today");
    if (f.value=="") f.value = util.printd("mm/dd/yyyy", new Date());
    ---- Below is the Registration Fee Javascript ---
    function calculateRegistrationFee() { 
         var s = this.getField("Today").value;
         if (s!="") {
              var d = util.scand("mm/dd/yyyy", s);
              return (12-(d.getMonth())) * 1.25;
         return "";
    I use the following in the Text Field (Text Field Properties ---> Format ---> Custom Format Script) to display the results:
    event.value = (calculateRegistrationFee()).toString();
    1) How can I format the return value to remove the decimal (period) from the results & split into two text fields?
    For Question #1 - Example 1, Let's look at this example:
    Using the current date (05/22/2013), then
    a. The output of the function above = 10
    This is a dollar amount so the output 10 is really $10.00. I would enter the cost into two fields (RegFee1 & RegFee2) as "10 00". (See below). So how do I format the return value to enter into these fields correctly?
    For Question #1 - Example 2, Let's look at this example:
    Using the current date (06/22/2013), then
    a. The output of the function above = 8.75
    Given the information in the example above, how do I format this return value to enter into these fields correctly?
    Thanks,
    Stephen

    Some time ago I created this (german) how to document
    http://www.oracle.com/global/de/community/tipps/textfield_autoformat/index.html
    about formatting elements using JavaScript. Currency formatting is not contained but perhaps the other stuff in the javascript file
    http://www.oracle.com/global/de/community/tipps/textfield_autoformat/library.html
    is helpful.
    Regards
    -Carsten

  • JSP removing decimal points

    Hello all.
    I am developing a site and Im new to JSP. now one of the pages I am developing needs to pull data out of a MySQL table.
    I can pull the data and it is working great! BUT the particular data I am pulling is pricing information.
    The data is in the following form:
    1.4800
    thats a price so its one dollar and fourty eight cents.
    the extra two decimal points are needed by the backend software so I cant remove them from the MySQL table (plus there is like 66,000 entries in the table).
    I need to find a way to remove these with JSP some how as they are irrelevant to what we need to display. the numbers are already rounded off so that all entries end with two 0's is there an easy way to remove these two zero's?
    Just so you know my code goes something like this.
    <form>     
    <% out.println("<select name=\"select\">");
    out.println("<option selected>Please select a Country</option>");
    int iBusNo = 0;
    int i = 0;
    while(bMoreData)
    out.println("<option>" +BusDirRecordset.getString("LongName")+ " - $" +BusDirRecordset.getString("Rate")+ "</option>");
    bMoreData = BusDirRecordset.next();
    i++;
    out.println("</select>");
    %>
    </form>If you have any suggestions I'd greatly appreciate the help!

    Go to http://java.sun.com/j2se/1.4.1/docs/api
    Look up the documentation for the class "NumberFormat".
    Cut and paste (with a slight mod) from the online document:
    NumberFormat nf = NumberFormat.getInstance();
    nf.setMinimumFractionDigits(2); // cut off trailing zeroes
    nf.setMaximumFractionDigits(2); // change "1.5" to "1.50"
    for (int i = 0; i < a.length; ++i) {
        output.println(nf.format(myNumber[ i ]) + "; ");
    A neat side-effect is that it's supposed to know your local "locale" information, so if you're in Spain using commas instead of periods as the fraction separator, that's what it'll do.

Maybe you are looking for

  • Low res SD video on widescreen HDTV... again g

    Have read a lot of comments about taking 1280x768 output from FCP and making an SD DVD. With the SD only having a maximum of 768 wide when it tries to show on a widescreen tv it looks low resolution (ie crappy!) What I am looking for is any help with

  • Not able to delete application in planning

    Hi! All, I was trying 17 step procedure of migrating planning (from appendixD of administrators guide) , could not login to target planning application, so now I want to delete the target to give it a try again, I am not able to delete the planning a

  • Transaction Notification with DI Server

    Hello I am developing a Web Site with the DI Server, when I have validations in the Transaction Procedure the error  message is incorrect. Message: Could not commit transaction. Transaction Notification set @error='10' set @error_message = 'SP: 123'

  • ABAP Proxy - JDBC scenario - checking condition insert_count

    Hello, I'm still fresh to XI topics and I'm supposed to do the scenario that sends data using JDBC My scenario mapping is as follows: 1) Delete tables A and B 2) Insert table A and B 3) if step 2 is sucessfull Insert table C I know what to do till st

  • Extreme will not extend linksys router

    I am trying to extend a wifi network from my linksys router but the extreme will not do this  help please