Microsoft KB Archive/113572

{|
 * width="100%"|

MSQuery: Error Using Decimal Values with Custom Expressions

 * }

-

The information in this article applies to:


 * Microsoft Query for Windows, version 1.0

-

SYMPTOMS
In Microsoft Query version 1.0, you receive the message "Syntax error" when you try to enter a custom expression that contains a decimal value but does not have a numeric value before the decimal point.

WORKAROUND
To avoid receiving this error message when you ener a custom expression that contains a decimal value, precede the value with a zero (0). For example, enter the value .09 as 0.09.

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in in the version of Microsoft Query that ships with Microsoft Excel version 5.0c for Windows.

MORE INFORMATION
Page 99 of the "Microsoft Query User's Guide" explains how to perform a calculation using your own expression in the following passage:

"For instance, to find the sales commission described in the example, you would type Sum(ORDER_AMT)*.15 in the column heading." This information is incorrect. If you type this expression into a column heading, you will receive the message "Syntax error."

The following is an example of the correct format for this equation (the decimal value contains a zero in front of the decimal point):

  Sum(ORDER_AMT)*0.15