Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with sum and %

Status
Not open for further replies.

ScanX

Programmer
Oct 13, 2003
26
BE
hello

I would like to calculate a percentage in a column depending on the results of the 2 other column..very trivial I know but still causing some trouble.

I'm new to Sybase so please be indulgent :)

SELECT
rtrim(DBA.agg_duplic_source.source),
sum(DBA.agg_duplic_source.nbr_household_unique),
sum(DBA.agg_duplic_source.nbr_household_duplicated),
(sum(DBA.agg_duplic_source.nbr_household_unique)) / ((sum(DBA.agg_duplic_source.nbr_household_unique)) +
(sum(DBA.agg_duplic_source.nbr_household_duplicated))),
 
nevermind I found it, just needed to cast stuff :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top