【Mysql】按季度查询结果数据累加

【Mysql】按季度查询结果数据累加,第1张

参考文档:

https://blog.csdn.net/homechao/article/details/81207551?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control

https://blog.csdn.net/chongmu2584/article/details/100738740?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_title-0&spm=1001.2101.3001.4242

string cmd="SQL语句"

DataSet RQ=new DataSet

//下面传递的参数中第二个是connection类型的SQL连接对象!

SqlDataAdapter run=new SqlDataAdapter(cmd,一个SQL连接)

QR.Fill(run)

Datagridview1.Datasource=RQ.Table[0].DefaultView

//此时datagridview中就是你查询出来的内容了

不好意思,我没看见累加,现在给你累加的

int index = this.dataGridView1.Rows.Add()

this.dataGridView1.Rows[index].Cells[0].Value = Title

this.dataGridView1.Rows[index].Cells[1].Value=DateTime.Now.ToString()

this.dataGridView1.Rows[index].Cells[2].Value = Result

this.dataGridView1.Rows[index].Cells[3].Value = URL


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/6637753.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-26
下一篇 2023-03-26

发表评论

登录后才能评论

评论列表(0条)

保存