[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.7

Database Field Values That Look like Scientific Notation - Need to fix

Asked by boris711 in Interbase / Firebird Database, Databases Miscellaneous, MS SQL Server

Tags: Firebird, SQL, 1.5

We have a Firebird v1.5 database that lives under a manufacturing program.  I believe this program is not storing numeric values correctly, but the software creator doesn't seem to think so, and I am breaking the user agreement by even looking at the raw data.  Regardless, I have used Database Workbench v2.8 to regularly run SQL scripts to correct values that are created with far too many decimal places.  It is hard to explain why this is necessary, but it screws with the reporting aspect of the software, this is another sticking point, but not one I will address here.  

The full SQL script has about 20 lines that each correct a field in a table.  This is what a typical line in the SQL script looks like (this syntax was provided by another EE member):

update ITEM set COST = cast (COST as decimal(15, 4));

Now lately, the SQL script has started to choke in one of the tables, and I believe it is because many of the fields contain erroneous values that looks something like:

-1.888522130117E296, this value should be 0.  

That value isn't treated as a numeric, the above script ignores it, so gradually we seem to be getting more of these fields.  Of course the actual values vary, but they all have seem to have the "E" character in the fourth position from the right.  I'd always thought that indicated error, but am not sure.    

So, here's my actual question:

Is there a line, or lines, that I can add to the SQL script that will change all these erroneous values to 0?  Please provide an example of code.  Also, if anyone know why these values may be getting created, please, do tell.

Many TIA!
Jeff
 
[+][-]10/28/08 12:57 PM, ID: 22825544Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/28/08 12:58 PM, ID: 22825562Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Interbase / Firebird Database, Databases Miscellaneous, MS SQL Server
Tags: Firebird, SQL, 1.5
Sign Up Now!
Solution Provided By: NickUpson
Participating Experts: 2
Solution Grade: A
 
[+][-]10/28/08 01:00 PM, ID: 22825576Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]10/28/08 01:38 PM, ID: 22826003Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 / EE_QW_2_20070628