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
Similar Messages
-
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 -
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. -
Remove decimal points from variable.
Hi,
I have a little issue.
I have one variable v = 25.000
and i want to remove (.000) from this variable so my result will be only 25 and i want this.
So, is ther any function to remove this?
I want to do it in one shot.
No 2-3 statements.
Points rewarded soon
Regards
RHHi Ronny,
You move this variable data to an integer variable.
Data: v_tempint type i.
move your_variable to v_tempint.
v_tempint will have the required result.
Reward points if this helps,
Kiran -
How to remove the decimal points at the end of the value????
hi,
we are using crystal reports 9.0. we have some reports which contains group by field. we have one field like address. if we select group by as address "The data is displayed grouped by the Address. But the address is shown in decimal points". for example if we have 55 as address field value, it shows 55.00.
the formula has written like as follows
if lowercase({?GroupBy}) = 'Address' then totext({rsp_GetDevMicro.Address})
now, i want to remove zeros which comes along with address field values.
can anyone help me in this?Not sure about Crystal 9 but on 11 I would convert it to a number to remove the leading zeroes then back to text again which allows you to remove the decimal point and any thousand seperators, ie:
CStr(ToNumber(),0,"") -
HOW to remove the decimal points for particaular field
hi friends,
Iam printing the quntity in decimal mode like 2.000.
but i want to print this as only 2.
How can i remove the the decimal in smart form..
Iam printing amount as 1234.00000.
But i have to print two zeros after decimal point..how can i remove zeros .
appricioate for u r answers..
regards,
sampath kumarYou may use the option
field(.0) for printing the quantity
field(.2) for printing the amount..
Go through SAP help given below..
<b>Number of Decimal Places
A program symbol of one of the data types DEC, QUAN, and FLTP can contain decimal place data. Use the option below to override the Dictionary definition for the number of decimal places for the formatting of this symbol value.
Syntax
&symbol(.N)&
The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.
&EKPO-MENGE& -> 1,234.560
&EKPO-MENGE(.1) -> 1,234.6
&EKPO-MENGE&(.4) -> 1,234.5600
&EKPO-MENGE&(.0) -> 1,235</b> -
Removing zeros after the decimal point Reply with quote
I want to remove the zeros after the decimal point, that this be done?
Например, Example,
120.000 => 120 120.000 => 120
120.300 => 120.3 120,300 => 120.3hiiiiiiii sweetsoni,
try this may it helpful for you
SHIFT string RIGHT DELETING TRAILING '0'.
SHIFT string RIGHT DELETING TRAILING '.'.
for example
DATA: v1 (6) TYPE c VALUE '100 .000 ',
v2(6) TYPE c VALUE '100.200'.
SHIFT v1 RIGHT DELETING TRAILING '0'.
SHIFT v1 RIGHT DELETING TRAILING '.'.
SHIFT v2 RIGHT DELETING TRAILING '0'.
SHIFT v2 RIGHT DELETING TRAILING '.'.
ultimately
v1 = '100',
v2 = '100.2'.
Moderator message: question and answer copied from external source, points deducted, do not repeat!
Edited by: Thomas Zloch on May 19, 2010 2:14 PM -
How to remove zero after decimal point.
hi friends
how to remove the zero after decimal points.
example :
123.450 -- if print only 123.45
45.600 - 45.6
any body help me.
thanks
pauldhamago through this example
it may help u
DATA: T(14) VALUE ' abcdefghij',
STRING LIKE T,
STR(6) VALUE 'ghijkl'.
STRING = T.
WRITE STRING.
SHIFT STRING LEFT DELETING LEADING SPACE (or use 0 to detete 0).
WRITE / STRING.
STRING = T.
SHIFT STRING RIGHT DELETING TRAILING STR or 0.
WRITE / STRING.
Output:
abcdefghij
abcdefghij
abcdef -
How to delete decimal point and adding leading zeros....
Hi,
I have one requirement in the report i.e.
<b>Present Value :</b> 44567.98
<b>Expected Value :</b> 0000004456798
In the present Value how will I remove that decimal point and how to add those six ing zeros. I tried with CONVERSION_EXIT....but it is not giving. Help me...
Thanks in advance.
Regards,
Kumar.Hi,
Use SPLIT and COMCATENATE fnctions.
Eg: split l_v at '.' into l_v1 l_v2
concatenate l_v1 l_v2 into l_v.
For adding leading zeros
Use FM CONVERSION_EXIT_ALPHA_INPUT.
Eg:
data: tknum type vttk-tknum value '99156'.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = tknum
importing
output = tknum.
Sri
Message was edited by:
Sri Tayi -
Decimal Points in Report Output
Dear Experts,
We have a keyfigure 0GR_Qty in the cube 0pur_c01.
For a Purchase order the 0GR_Qty in the cube 0pur_c01 is 9.12 MT.
We created a report on this cube and executed the report for this PO, but in the output the 0GR_Qty is showing as 9.00 MT.
It is not showing the decimals. I tried with removing the decimals and also increasing the decimal points to 4 or 5 etc. But also it is
not displaying the decimal points.What may be the reason ? Please specify. Not only for this PO for all other po's also it is showing
like this.
Regards,
Bhadri M.Hi All,
Thanks for the reply.
After changing the properties of keyfigure also the decimal places are not coming in the query output. In listcube i checked for 0gr_qty, it is showing as 9.12 and the base unit is MT.
In CUNI how to maintain the number of decimal places for the unit MT. I am unable to find this unit here.
Regards,
Bhadri M. -
Remove decimal & zeros in variable
Hi,
How to remove zero & decimal point in variable
for eg.
insted 5.0000 it should priint 5
ThanksDear 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 -
RE: Reduce the Decimal Points
Hi All,
I need to reduce the decimal points. my key figures are VGW01- Standard Value, VGW02- Standard Value,
0conf_act1 - Conf. activity 1, and 0conf_act2 Conf. activity 2 these are all data type as quantity. In report Data is coming 5.040,
04.3234 like this so i have to reduce this decimal points, so could me give me answer for this scenario. And is there any routine needed for this.
Thanks & Regards,
RajeshHI,
First convert that value type to character, and then using WRITE TO statement you can move value to another one.
if you need not to do any manipulations further
because character types can not be manipulated.
or
declare another temporary valiable and then substract to 2 decimals, my suggestion is remove value from 2 dig from last. -
Format a number with a decimal to show the value but not the decimal point
I have a value of 129.50 in the DB. I'm using the htp.prn() function to export this value to a txt file. I have the field padded with leading 0s (so it looks like 0000129.50)
I need to keep the value for the .50 but don't want the decimal point to show up (so I need it to look like 000012950) but can't figure out how to make it keep the value for the .50 but not actually show the decimal point - any ideas? (APEX 4.0 11g)Multiply by 100 and remove the formatting. htp.prn (to_char (number_item, '99999999999'));
Edited by: Kleber M on Sep 14, 2011 5:10 AM -
Strip decimal point from string
Is there an easy solution to strip a decimal without the whole charAt stringbuffer thing.
I try this
String test = "1.234";
String stripped = test.replace('.','/');
and i get "1/234" as result. But I dont want "/". I want blank.
This doesnt compile
String stripped = test.replace('.','');If you want blank (1 234) then
String stripped = test.replace('.',' ');
will work. If you want to just remove the decimal point (1234) then
test = "1.234";
String[] prts = test.split("\\.");
System.out.println(">>>" + prts.length + "<<<<");
if (prts.length > 1) { test = prts[0] + prts[1]; }
else { test = prts[0]; }
System.out.println(">>>" + test + "<<<<"); -
Lost decimal point after export to text file
Dear All,
I have problem which to beset me long long time. I haven't dug the cause yet. Actually, I have a program which will generate a text file in background everyday. The text file included po data which is create last day, such as po no, item, unit price etc. But sometimes, not every times, one of item data's unit price will lost the decimal point in the text file, for example, the po unit price is 18.80 stored in database. but the outcome is 1880 in the text file. Do you have encountered such kind of problem? Thanks!Hi
sorry cant get you..
need some more explanation
can you send me the code
Regards
V.Balaji
Maybe you are looking for
-
I'm new to After Effects and I'm using AE6. I'm working on a video clip. After drawing a Region of Interest I selected Crop Comp to Region of Interest in the Composition drop down menu. Nothing happens! The original bounding box of the comp stays t
-
Impermissible Passwords and password generate
Hallo. I need to avoid that in the portal password there are special characters. So I put in the Impermissible Passwords: :,!,",@,$,%,&,/,(,),=,',`,+,~,#,-,_,.,;,:,{,[,],},\,<,>,* ,|* The problem : I go in the "User administration"->"Identity managem
-
Validations in isConsistent() for Emergency Contact
Hi, I am working on Emergency contact screen. I added some validations for telephone number field. Problem :: Duplicate records are created in backend, when there is a user error in telephone number field I think when user clicks Save, onFlush() met
-
I'm unable to download Maverick. I'm told to sign under the account I used to purchase it. I am signed in under my Apple ID. I'm signed in with iTunes. I don't know what else to do. Has anyone else had this problem?
-
itunes doesnt have every song i want. is there anyway to get itunes to put up a specific song that they dont carry?