AVG() SQL function. Help please

S

Steven

Hi. I have the following sql statement:
SELECT AVG(grade) FROM tblEvalGrades WHERE SSN='123456789'

I get the following error when trying to output my table
in my datagrid:
ERROR: Decimal byte array constructor requires an array
of length four containing valid decimal bytes

The grades that I have are GPAs. I am using an Access
database, and the field grade is Precision 4, Scale 2,
and Decimal Places 2. Could someone tell me what I need
to do to get rid of the error. Thank you in advance.

Steven
 
L

Lynn Trapp

It appears that you have set the FieldSize of the Grade field to Decimal.
The value you put in the Precision property is the total number of digits
that can stored, both to the left and right of the decimal point. The Scale
property is the number of If you have set the Precision to 4 and the result
of the Avg function turns out to be 85.32479, then Access is possibly going
to balk. If I were you I would simply change the FieldSize to Double and,
then, you won't have to worry about the precision.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top