Archive

Archive for August 24th, 2009

推荐的 CSS 书写顺序

August 24th, 2009 Tony hu No comments
//显示属性
display
list-style
position
float
clear

//自身属性
width
height
margin
padding
border
background

//文本属性
color
font
text-decoration
text-align
vertical-align
white-space
other text
content
Categories: Css Tags:

数据库表某一列中相同值的个数

August 24th, 2009 Tony hu 2 comments

今天整理一大堆数据(一共900行数据),我发现仓库管理员可能在处理这些数据时出错了,所在验证了一下。

我使用了以下SQL语句:

Select [1],count([1]) as Qty from
(SELECT [1] FROM  [Shelfs]
union all  SELECT [2] FROM  [Shelfs]
union all  SELECT [3] FROM  [Shelfs]
union all  SELECT [4] FROM  [Shelfs]
union all  SELECT [5] FROM  [Shelfs]
union all  SELECT [6] FROM  [Shelfs]
union all  SELECT [7] FROM  [Shelfs]) a where [1]<>” group by [1] order by Qty desc

得出的结果很清楚地可以看到,有的是相同的数据,而我需要的是不同的数据,即他整理重复了。特别记录一下。

Categories: SQL, Sql Server Tags: