Solved

format a double in SQL instruction

Posted on 2002-04-09
9
1,963 Views
Last Modified: 2012-06-27
I want to retrieve some numbers(double) from a table by SQL and populate a MSHFlexGrid with them but instead of apear with a comma (###,##) it apears with a dot (###.##)
Is the problem with the SQL instruction or the MSHFlexGrid
Can I solve it with a SQL format?

Thanks
0
Comment
Question by:asimoes
9 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 200 total points
ID: 6929287
Hi asimoes,

-You could check your ODBC settings if you use that got no dialog here bu look at the translation of numbers/chars
-OR and most probable look at the client settings in your regional settings panel

:O)Bruintje
0
 
LVL 5

Expert Comment

by:kcm76
ID: 6929353
or...
in the regional setting change the currency format.

kcm
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6929426
bruintje has the right idea I think, I would imagine that you need to check the box which says "Use Regional Settings for dates and numbers" or something like that.
0
 
LVL 2

Expert Comment

by:telebasics
ID: 6929869
You can force the return value's (dont know the datagrid but...) by using the format command

mynr = format(theval,layout)

these mostly only work fine with date or currency format, time is also good.
Bu numbers are more display side then anything else.

Ofcourse it also only works when converting the number or currency etc to a string to display or something.

0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:asimoes
ID: 6930841
I've seen my regional settings and they are fine.
FOR NUMBER
Decimal symbol=,
Digites after decimnal=2
digit group symbol=.
FOR CURRENCY
c.symbol=€
Decimal symbol=,
Digites after decimnal=2
digit group=123.456.789

So I thing it's not this.
Note that just when the values enter in the flexgrid they assume the "123.23" format instead of the "123,34" one.
Because if before I see those values they apear in the correct format.
How can I go to my ODBC settings to check.

Thanks
0
 

Author Comment

by:asimoes
ID: 6931333
I've seen my regional settings and they are fine.
FOR NUMBER
Decimal symbol=,
Digites after decimnal=2
digit group symbol=.
FOR CURRENCY
c.symbol=€
Decimal symbol=,
Digites after decimnal=2
digit group=123.456.789

So I thing it's not this.
Note that just when the values enter in the flexgrid they assume the "123.23" format instead of the
"123,34" one.
Because if before I see those values they apear in the correct format.
How can I go to my ODBC settings to check.

Thanks
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6931371
Hi asimoes,

i was willing to get into more detail if needed, but why the C?? please don't accept and grade prematurly if you're not completely satisfied with a comment

that's why we comment instead of answer, to get as much input as you need to solve your problem...

a grade doesn't cost you any point extra, but it really ruins my record and that wasn't needed since it was only a comment

:O)Bruintje
0
 

Expert Comment

by:ComTech
ID: 6931493
Hello asimoes,

a little advice on accepting answers here at EE.  Please read the below article from EE Users Guide.  and also, out of respect, when answering, please leave comments after accepting, that would help greatly.

How Do I Know What Grade to Give?

Although we use an A-C scale here at Experts Exchange, it works differently than, say, school grades. If one or more Experts' proposals are accepted as answers, they should usually be given an A or B grade, since they have taken the time to provide you with a working solution. If a possible solution is incomplete - ask for clarification or details before accepting the answer and grading it.

People should not be given lower grades because of incorrect grammar or because you just accepted their answer or comment to close the question. Keep in mind, your question and any follow-up comments should be focused so that there can be a specific answer. The following is a good guideline to follow when grading:

A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information
that thoroughly answered your question. An "A" can also be given to any answer that you found informative or enlightening beyond the direct question that you asked.

B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.

C: Because Experts' reliability are often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just sking Community Support to delete the question.

Remember, the Expert helping you today is probably going to be helping you next time you post a question. Give them a fair chance to earn an 'Excellent!' grade and they'll provide you with some amazing support.


Regards,
ComTech
CS Admin @ EE

btw-As there is no explination from you as to why a C was given, I am compelled to change the Grade.  And as bruintje has pointed out, the collobration process could have gone much further to help you.
0
 

Author Comment

by:asimoes
ID: 6931658
I´m very sorry.
I'll won't do it again.

0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now