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

求SQL(送分)

ID    DATE    CODE    TIME
=============================
A    1123    9      0015
A    1123    0      1535
A    1123    9      1620

A    1124    0      2330
A    1124    9      0010

针对以上鼠标请教一个SQL,查询出:

11月23日 1.  CODE=0
        2.  CODE=9中TIME大于CODE=0中最小TIME的所有记录

在线等!
先接分.

SQL code:
1
SELECT * from TB WHERE CODE=0 AND DATE ='1123'


1.select * from table where code=0
2.select * from table where code=9 and time>(select min(time) from table where code=0)

1.select * from table where code=0 and data='1123'
2.select * from table where code=9 and data='1123' and time>(select min(time) from table where code=0 and data='1123')

SQL code:
-- =============================================
-- Author: T.O.P
-- Create date: 2009/11/26
-- Version: SQL SERVER 2005
-- ==============


相关问答:

csv文件转换成sql导入到数据库,没有数据为何?

执行的顺序:
1)文件浏览框(选择文件使用)
选择好文件后
点击一个导入按钮的时候 ,把上面上传框里的csv文件以一个ID为文件名,上传到**/**文件夹下
2)读取这个文件夹下的csv的文件,转换成sql
3 ......

数据窗口动态修改Sql - PowerBuilder / DataWindow

为了满足数据查询的速度问题,我将一张数据量大的学生表按年度分成多个表
students_2008, students_2009然后我又做了一个模板表students_template,模板表中的字段和students_2008, students_2009一样,只不过是一个 ......

sql 截取字符串

我要得到一个字符串如:
sdfk|||sgts
sdfsfd|||rgreg
wrfw|||sefw
就是要得到|||后面的字符串,有什么函数吗?怎么用呢?谢谢!
SQL code:
select
right(col,len(col)-charindex('|||',col)-2)
f ......

sql语句的问题 - MS-SQL Server / 基础类

有2个表啊: 
表名:yh 
用户编码 用户名称  
001 a 
002 b 
003 c 
表名:ys 
用户编码 本期指数 抄表时间 
  001 ......

SQL时间段问题

一个很奇怪的问题 
SQL code
select * from Gprs_DataInof 
--可以查到所有的数据
select * from Gprs_DataInof where DataTime between 1900-10-16 1:01:00' and '2009-10-20 1:01:00'
--一条数据 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号