[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

Author Message
john1123
General User

Joined: 28 Jun 2012
Posts: 8

 Posted: Thu Jun 28, 2012 12:52 am    Post subject: [solve] help oobase, number become zero after dot in DECIMAL i have set the field type to decimal[DECIMAL] but when i key in the data it still showing zero example: 10.5 --> 10 can help me to solve this problem????Last edited by john1123 on Sun Jul 01, 2012 9:38 pm; edited 1 time in total
Sliderule
Super User

Joined: 29 May 2004
Posts: 2499
Location: 3rd Rock From The Sun

 Posted: Thu Jun 28, 2012 6:44 am    Post subject: If you are defining the field type to DECIMAL, you can also set a value ( number ) for the maximum number of decimal places you want defined for the field, you must also define that. If you want the stored data in the table to have an accurracy up to 15 decimal places, whether. for example. 0 or 5 or 8 or 11 or 13. define the field type as Number [ Numeric ] rather than a Decimal. I hope this helps, please be sure to let me know. Sliderule Thanks to add [Solved] in your first post Title ( edit button ) if your issue has been fixed / resolved.
john1123
General User

Joined: 28 Jun 2012
Posts: 8

 Posted: Thu Jun 28, 2012 5:06 pm    Post subject: i have try to use number [NUMERIC] also but i still get the same problem that after i type 10.5 and done the data key in it will goes to zero after the dot (10) ps: i using open office 3.4, win xp
Sliderule
Super User

Joined: 29 May 2004
Posts: 2499
Location: 3rd Rock From The Sun

Posted: Thu Jun 28, 2012 5:16 pm    Post subject:

 john1123 wrote: Posted: Thu Jun 28, 2012 6:06 pm Post subject: i have try to use number [NUMERIC] also but i still get the same problem that after i type 10.5 and done the data key in it will goes to zero after the dot (10)

Where are you entering your data?
1. Table -> Open
2. At the bottom of a Query
3. A form you built
4. Other

 john1123 wrote: and done the data key

I have no idea what you are talking about.

Sliderule
john1123
General User

Joined: 28 Jun 2012
Posts: 8

 Posted: Fri Jun 29, 2012 1:06 am    Post subject: at tables, queries and forms also try i really have not ideal wht to do
Sliderule
Super User

Joined: 29 May 2004
Posts: 2499
Location: 3rd Rock From The Sun

Posted: Fri Jun 29, 2012 5:54 am    Post subject:

 john1123 wrote: i really have not ideal wht to do

Nor do I. I have never seen what you are describing.

Sliderule
john1123
General User

Joined: 28 Jun 2012
Posts: 8

 Posted: Fri Jun 29, 2012 7:29 pm    Post subject: sorry my English is not good ok, now my problem is my data need to key in as number and it only have 2 digit of decimal, but every time i key in the data, it only show the number, and the decimal will become zero like this example: 10.50, it will go to 10 only even though i use number[NUMERIC], it will become 10.00 i cant get the 0.50 amount i have try to set the language as English USA at tools->option->language and i have also try this SQL that i read at this forum code: -- Add the NEW field before the old field to the table as a decimal with 2 decimal places default to zero ALTER TABLE "FactDiaria" ADD COLUMN "CajaEmpUSD_02" DECIMAL(15,2) DEFAULT 0.00 NOT NULL BEFORE "CajaEmpUSD" -- Populate the New field with the data from the old, and, 0 if NULL in the old UPDATE "FactDiaria" SET "CajaEmpUSD_02 = COALESCE("CajaEmpUSD",0) -- Remove the OLD field ALTER TABLE "FactDiaria" DROP COLUMN "CajaUSD" -- Change the name of the NEW field to the name of the OLD field ( just removed ) ALTER TABLE "FactDiaria" ALTER COLUMN "CajaUSD_02" RENAME TO "CajaUSD" but at the end i still cant get my decimal digit
Sliderule
Super User

Joined: 29 May 2004
Posts: 2499
Location: 3rd Rock From The Sun

 Posted: Fri Jun 29, 2012 7:51 pm    Post subject: Follow these steps: Open your OpenOffice Base File ( *.odb ) Click on the Tables icon on the left Right click on table: "FactDiaria" Open At the top of column "CajaUSD" right click and choose: Column Format... On the Format Tab, at Options, Decimal Place, select 2 Click on the red X in top right corner To save the formatting for this field: Either: Click on the Save icon on the toolbar Ctrl + S From the Menu: File -> SaveI hope this helps, please be sure to let me / us know. Sliderule Thanks to add [Solved] in your first post Title ( edit button ) if your issue has been fixed / resolved.
john1123
General User

Joined: 28 Jun 2012
Posts: 8

 Posted: Fri Jun 29, 2012 10:54 pm    Post subject: T T now is show 10.00 but my 0.50 still missing is that my computer problem?? but i have try at my company's computer, it have a same problem i'm using win xp sp2, open office v3.4 computer language : English- US open office language: English-US
Sliderule
Super User

Joined: 29 May 2004
Posts: 2499
Location: 3rd Rock From The Sun

 Posted: Sat Jun 30, 2012 6:37 am    Post subject: I am sending you a PM ( Private Message ). Sliderule
john1123
General User

Joined: 28 Jun 2012
Posts: 8

 Posted: Tue Jul 03, 2012 7:38 pm    Post subject: thanks sliderule [img]http://gq1.attach.mail.ymail.com/us.f1147.mail.yahoo.com/ya/securedownload?mid=2%5f0%5f0%5f4%5f27110%5fAIy3iGIAACi4T%2fEzPQnyR1GsgDc&pid=2.2&fid=Trash&inline=1&appid=YahooMailNeo&cred=tJZ8pWTbD5LoOojN_ZJBAh56SCgwf1jPrWv1o2petDlkFOQ6Cl7Ak.jqFIHJ_T.wJ3Ig5e0p9jsloJVRC9SKXwnOholU6OQCN.tjw6Bo77YNxCz3usOX_9ZY7LzfLI.a4Moj3a31IoFVmyn_0Ugy&ts=1341372653&partner=ymail&sig=eQqOwB5KcON.J2r.Ti7mEw--[/img]
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum