select a.*,b.*
from a inner join b on a.contract_number(varchar)=b.cnotract_number
where start_date(datetime)> 2000.01.01 and start_date(datetime)<2003.06.04
and kaoping_result=1
from a inner join b on a.contract_number(varchar)=b.cnotract_number
where start_date(datetime)> 2000.01.01 and start_date(datetime)<2003.06.04
and kaoping_result=1
解决方案 »
- 看看
- 选取最大记录,并且最大记录的日期和当前日期差几天!
- 如何解决这个问题而且有好的sql performance
- 关于一个架构和用户的问题
- 求助:关于Sql语句中的判断
- 数据表性能优化的问题请教
- 关于vc + odbc API + SQL server 2000 的一些问题
- 有N个班级,N个学生,我想每个班级选出三个学生。最好一条语句搞定。高手请试?
- 如何定义长度大于4000的字符类型?
- sqlserver 字段以逗号分隔成多行数据
- 請大家幫忙說說這些是什麼意思?(writetext bulk,SET TRANSACTION ISOLATION LEVEL )
- 帮忙看看这个问题,我给了一个存储过程,但出现错误。
group by person_code
from a a,b b
where b.start_date>'2004.01.01' and b.start_date<'2003.06.04'
and kaoping_result=1
group by person_code
left join b on a.cnotract_number=b.cnotract_number
where b.start_date between '2000.01.01' and '2003.06.04'
and a.kaoping_result = 1
group by person_code
group by person_code
select person_code,count(kaoping_result) from 表A left outer join 表B on 表A.contract_number = B.contract_number where start_date between 2000.01.01 and 2003.06.04
b.start_date start_date
from a, b
where kaoping_result = 1
and
a.contract_number = b.contract_number
and
b.start_date > '2000.01.01'
and
b.start_date < '2003.06.04'
left join b on a.cnotract_number=b.cnotract_number
where b.start_date between '2000.01.01' and '2003.06.04'
and a.kaoping_result = 1
group by person_code