易截截图软件、单文件、免安装、纯绿色、仅160KB

sql 怎么写???

TB1
SQL code:

ID DATE
1 2009年1月
2 2009年12月
3 2009年3月
4 2009年6月
5 2009年2月
6 2009年3月
7 2009年6月



查询id 在 3,4,5,6,7 范围内 所有 date 得到:2009年3月,2009年6月,2009年2月

SQL code:
select distinct date from tb1 where id in (3,4,5,6,7)


SQL code:
select date from between id 3 and 7


SQL code:
select distinct date from tb1 where id in (3,4,5,6,7) order by date
select distinct date from tb1 where id between 3 and 7 order by date


select distinct Date from TB1 where id in(3,4,5,6,7)

不是
执行结果 在一个单元格内

SQL code:

结果
date
--------------------------------
2009年3月,2009年6月,2009年2月



结果在一个单元格内,最好日期排序,如下
SQL code



Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/


相关问答:

如何用c#,sql2000 开发c/s下的工作流?

本人c#新手 可是要求要用c# ,sql2000开发c/s的工作流,一头雾水,请大家帮忙帮忙,给点思路,说的约具体越好,我也好往那个方面去学习
http://www.hxzi.com/view/61402.html
B/S版的,基本思想应该差不多的。。 ......

关于group by的sql语句?

  with adod_dict do
    begin
    close;
    commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; ......

SQL server数据集出错求助

两种错误:
1.如果我这样申明:ResultSet rs;错误提示如下:

An error occurred at line: 51 in the jsp file: /index.jsp
The local variable rs may not have been initialized
48:    ......

C#如何判断连接sql server数据库成功?

C#如何判断连接sql server数据库成功?
try
{
connection.connect()
return true;
}
catch()
{
return false;
}

楼主很着急,开了几贴了。

引用
try
{
connection.connect( ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号