在添加2条SQL查询的值时需要帮助 [英] need help in adding the values of 2 sql quries
本文介绍了在添加2条SQL查询的值时需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我想添加以下查询结果,并且必须在年份更改后在网格中显示
请告诉我怎么做
Hi all
i m want to add the below query result and have to show in grid after year change
please tell me how to do
SELECT 15- sum(EL) as el, 1 - sum(CL) as cl, 14 - sum(ML) as ml FROM attendance
//此查询的当前值
//current value of this query
SELECT 15- sum(EL) as el, 1 - sum(CL) as cl, 14 - sum(ML) as ml FROM attendance
//此查询的新值
//new values of this query
推荐答案
GROUP BY
[ ^ ]子句可能是您 u正在寻找.
GROUP BY
[^] clause might be what you are looking for.
使用substr
int lnlenght = varaible.lenght
nvaraible = convert.todecimal(variable.Substring(3,length);
nvariable = nvaraible +10
newvariable = variable.Substring(0,3)+ nvaraible
use substr
int lnlenght=varaible.lenght
nvaraible=convert.todecimal(variable.Substring(3, length);
nvariable = nvaraible +10
newvariable = variable.Substring(0, 3)+nvaraible
这篇关于在添加2条SQL查询的值时需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文