select sum(datediff(ss,B.begin1,B.end1) as TimeCount 
from tb_data_1_1 A,TB_Picture B  where A.BatchName = B.BatchName and A.PicName = B.PicName 
and Convert(varchar(10), B.end1, 120) = '2008-08-15' and B.status1 = 2
 and user1='0005492'rt

解决方案 »

  1.   

    select sum(datediff(ss,B.begin1,B.end1)) as TimeCount 
    from tb_data_1_1 A,TB_Picture B  where A.BatchName = B.BatchName and A.PicName = B.PicName 
    and Convert(varchar(10), B.end1, 120) = '2008-08-15' and B.status1 = 2
     and user1='0005492'
      

  2.   

    codeselect sum(datediff(ss,B.begin1,B.end1)) as TimeCount 
    from tb_data_1_1 A,TB_Picture B  where A.BatchName = B.BatchName and A.PicName = B.PicName 
    and Convert(varchar(10), B.end1, 120) = '2008-08-15' and B.status1 = 2
     and user1='0005492'
      

  3.   

    select sum(datediff(ss,B.begin1,B.end1)) as TimeCount 
    from tb_data_1_1 A,TB_Picture B  
    where A.BatchName = B.BatchName and A.PicName = B.PicName 
    and Convert(varchar(10), B.end1, 120) = '2008-08-15' and B.status1 = 2
     and user1='0005492'
      

  4.   

    select sum(datediff(ss,B.begin1,B.end1)) as TimeCount 
    from 
    tb_data_1_1 A,
    TB_Picture B  
    where 
    A.BatchName = B.BatchName 
    and 
    A.PicName = B.PicName 
    and 
    Convert(varchar(10), B.end1, 120) = '2008-08-15' 
    and 
    B.status1 = 2
     and 
    user1='0005492'