Author |
Message |
Rediff
Mudiripoyina Bewarse Username: Rediff
Post Number: 4774 Registered: 03-2004 Posted From: 67.176.15.43
Rating:N/A Votes: 0(Vote!) | Posted on Saturday, July 30, 2005 - 9:37 pm: | |
MM mama .. yeah adi display ki work avuddi .. kaanee veellu table lone alaa store cheyaali.. plain select should display the values in req format antaaremo ani alochistunna.. btw, LTRIM(to_char(value,99999.99)) is much better i guess.. YNR mama.. yeah they are diff .. ade naa prob .. format command .. use cheyamani cheppalekapovachu mama.. mostly I will (a) suggest them to use LTRIM_TOCHAR way while selecting or (b) ask them if I can change the column definition to char and if thats the case ..before insertng values do that LTRIM/TOCHAR processing. thanks mamalooo. |
Yendi_naa_royya
Kurra Bewarse Username: Yendi_naa_royya
Post Number: 699 Registered: 06-2005 Posted From: 68.199.132.27
Rating:N/A Votes: 0(Vote!) | Posted on Saturday, July 30, 2005 - 7:56 pm: | |
displaying results and storing values are both different. SQL> column value1 format 999.99 if u run query now after setting column format then u will get waht u wanted. |
Megamama
Mudiripoyina Bewarse Username: Megamama
Post Number: 5166 Registered: 07-2004 Posted From: 24.98.119.29
Rating:N/A Votes: 0(Vote!) | Posted on Saturday, July 30, 2005 - 7:46 pm: | |
maama naaku database ki inti nundi access ledu..so just hypothetical ga cheppina..just test it out..shud work |
Megamama
Mudiripoyina Bewarse Username: Megamama
Post Number: 5165 Registered: 07-2004 Posted From: 24.98.119.29
Rating:N/A Votes: 0(Vote!) | Posted on Saturday, July 30, 2005 - 7:44 pm: | |
check this select to_char(value1,'NNNN.NN'),to_char(value2,'NNNN.NN' ) from TS_TMP4 |
Megamama
Mudiripoyina Bewarse Username: Megamama
Post Number: 5162 Registered: 07-2004 Posted From: 24.98.119.29
Rating:N/A Votes: 0(Vote!) | Posted on Saturday, July 30, 2005 - 7:31 pm: | |
voke..will get back to u on this once login to DB |
Rediff
Mudiripoyina Bewarse Username: Rediff
Post Number: 4773 Registered: 03-2004 Posted From: 159.37.7.93
Rating:N/A Votes: 0(Vote!) | Posted on Saturday, July 30, 2005 - 7:19 pm: | |
nenu basigga vere table nundi techi data insert cheyaali.. ee destination table lo format alaa vundaali antaa.. so my plan is to define field as char and use tochar and Ltrim before inserting .. I know it would work.. but extra processing and datatype definition change are my concers!! |
Rediff
Mudiripoyina Bewarse Username: Rediff
Post Number: 4772 Registered: 03-2004 Posted From: 159.37.7.93
Rating:N/A Votes: 0(Vote!) | Posted on Saturday, July 30, 2005 - 7:14 pm: | |
idigo naa simple test... ---------------------------------- create table TS_TMP4 (value1 number(10,3), value2 number(10)); insert into TS_TMP4 values (10.34,10.34); insert into TS_TMP4 values (10.84,10.84); insert into TS_TMP4 values (10,10); insert into TS_TMP4 values (10.00,10.00); select * from TS_TMP4;
10.34 | 10 | 10.84 | 11 | 10 | 10 | 10 | 10 | | I though it may be storing 10.00 but only displaying as 10 .. so I have executed following query .. still the same result select to_char(value1),to_char(value2) from TS_TMP4; ------------- |
Rediff
Mudiripoyina Bewarse Username: Rediff
Post Number: 4771 Registered: 03-2004 Posted From: 171.72.5.226
Rating:N/A Votes: 0(Vote!) | Posted on Saturday, July 30, 2005 - 7:06 pm: | |
ardam kaaledu mama.. I have already set the precision when i said type as number(x,2) ..right?? using trim will only help reducing the precision of number.. say 12.123 to 12.12 .. but not to increase precision from 12.1 to 12.10 .. probably u meant padding?? |
Megamama
Mudiripoyina Bewarse Username: Megamama
Post Number: 5159 Registered: 07-2004 Posted From: 24.98.119.29
Rating:N/A Votes: 0(Vote!) | Posted on Saturday, July 30, 2005 - 6:25 pm: | |
Rediff maama Precession is the only way for your problem and I dont see any problem with integers too because integer itself while inserting ..inserts with the precession... there is no other way...you can handle any extra digits after precession using LTRIM or RTRIM as required in a procedure or function... hope am clear..let me know if u still have any doubts |
Rediff
Mudiripoyina Bewarse Username: Rediff
Post Number: 4770 Registered: 03-2004 Posted From: 67.176.15.43
Rating:N/A Votes: 0(Vote!) | Posted on Saturday, July 30, 2005 - 5:21 pm: | |
Hello mamaloo.. is there any way to force the scale of numbers in oracle?? i.e 10 needs to be represented as 10.00 setting definition as Number(x,2) is not of any help in the case where some of the values are integers. thanks in advance |