按表列划分

时间:2015-06-04 08:44:38

标签: c#

我能知道为什么分频器没有显示价值吗?

- (void)applicationDidEnterBackground:(UIApplication *)application
{

    // Change the rootViewController of your window.. 
}

最后一列的值始终显示为0.不应该是columnA / 12?

    select gg.columnA ,t.columnB, (gg.columnA / t.columnB) as C
    FROM #main t
LEFT OUTER JOIN #Total_ByGradeGender gg
    ON t.OrganizationCd = gg.OrganizationCd
    AND t.CountryCd = gg.CountryCd
    where t.organizationcd = '27849' 

如果我将分频器更改为整数,则显示该值。

1 个答案:

答案 0 :(得分:0)

您需要转换为数字

select gg.columnA ,t.columnB, (gg.columnA /cast( t.columnB as numeric))  as C
   FROM #main t
LEFT OUTER JOIN #Total_ByGradeGender gg
ON t.OrganizationCd = gg.OrganizationCd
AND t.CountryCd = gg.CountryCd
where t.organizationcd = '27849' 
相关问题