SQL AVG function does not return decimal



IBM's flagship relational database management system

SQL AVG function does not return decimal

Postby hnharish » Fri Nov 19, 2010 12:35 pm

Hi All,

I have written a query to calculate the average value of a column but the issue is the column is not returning Decimal value ex: if the avetrage value is 12.567 its returning the value as 12 i need atleast 2 decimal places to be shown ie. 12.56. Could you pls help me resolving this issue.

Thanks in Advance.
hnharish
 
Posts: 3
Joined: Thu Mar 11, 2010 12:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SQL AVG function does not return decimal

 

Re: SQL AVG function does not return decimal

Postby hnharish » Fri Nov 19, 2010 12:38 pm

Hi Team,

Adding to the above queries i m using DB2 SQL query and AVG function to calculate the average.

Thanks,
Harish
hnharish
 
Posts: 3
Joined: Thu Mar 11, 2010 12:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SQL AVG function does not return decimal

Postby GuyC » Fri Nov 19, 2010 1:31 pm

cross forum post
GuyC
 
Posts: 315
Joined: Tue Aug 11, 2009 3:23 pm
Has thanked: 1 time
Been thanked: 4 times

Re: SQL AVG function does not return decimal

Postby dick scherrer » Sat Nov 20, 2010 1:06 am

Harish,

Do not post topics on multiple forums.

If you would prefer to use this forum instead of the other(s), we can remove you from there.

This topic is now locked.

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post