Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Division on Sums and counts of fields help.

Author  Topic 

sqlbrahzilla
Starting Member

7 Posts

Posted - 2015-04-08 : 18:33:39
realized this is the wrong server for postgres :)

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2015-04-08 : 19:20:13
We'll need to see some sample data to help out. It's likely a data type issue though. You can probably multiple the divisor by 1.0 so that you get decimal points out of it.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

sqlbrahzilla
Starting Member

7 Posts

Posted - 2015-04-08 : 20:52:02
here's a link of the output



let me know if you need more. Notice every division example has 0..the syntax must be off.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2015-04-08 : 21:27:56
Is this PostgreSQL? If so this is a Microsoft SQL forum so you may not find people here who will know the answer.

The code looks fine to me, but if PostgreSQL there might be other issues at play that I am not familiar with.
Go to Top of Page
   

- Advertisement -