本文介绍了如何使用C#中的编码来计算预览行数并将其放入sql的单元格中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我的表格中有此列

VisitId
VisitDate
预览


我想显示出访问次数取决于日期数


喜欢

VisitDate Preveisits
12/10/2011 0
2011/12/5 1

如何进行编码我以手动方式将0和1设置为优先,但我想对其进行编码并在标签中显示

If I have table has this columns

VisitId
VisitDate
PreVisits


I want to show in previsits the number of visits depends on the number of date


like

VisitDate Preveisits
12/10/2011 0
12/5/2011 1

how to do it coding i put 0 and 1 in previsits by my hand as an example but I want to made it coding and show it in a label

推荐答案

SELECT VIsitDate,COUNT(*) AS Previsits FROM MyTable
GROUP BY VisitDate
GO


这篇关于如何使用C#中的编码来计算预览行数并将其放入sql的单元格中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 12:03