日期:2014-05-17 浏览次数:20532 次
select * from oplogsTb a where a.i_datetime > '2013-07-07' and a.i_op_id like '%转帐%'
----------------------------
-- Author :DBA_Huangzj(發糞塗牆)
-- Date :2013-09-23 17:47:34
-- Version:
-- Microsoft SQL Server 2014 (CTP1) - 11.0.9120.5 (X64)
-- Jun 10 2013 20:09:10
-- Copyright (c) Microsoft Corporation
-- Enterprise Evaluation Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
--
----------------------------
--> 测试数据:[T]
if object_id('[T]') is not null drop table [T]
go
create table [T]([id] int,[i_op_id] varchar(9),[i_datetime] varchar(10),[i_op_situs_no] datetime)
insert [T]
select 10500,'转帐:入金','2013-08-02',' 16:36:02.623' union all
select 10501,'转帐:入金','2013-08-02',' 16:39:45.233' union all
select 10502,'转帐:出金','2013-08-02','16:44:36.733' union all
select 10503,'转帐:入金','2013-08-02',' 16:45:58.357' union all
select 10504,'转帐:出金','2013-08-02','16:46:10.873' union all
select 10505,'转帐:入金','2013-08-02',' 16:54:46.357' union all
select 10506,'转帐:出金','2013-08-02','16:55:12.937' union all
select 10507,'转帐:入金','2013-08-02',' 16:58:17.547' union all
select 10605,'转帐:入金','2013-08-05',' 10:37:56.437' union all
select 10606,'转帐:入金','2013-08-05',' 10:45:54.467' union all
select 10607,'转帐:出金','2013-08-05','10:49:35.107' union all
select 10608,'转帐:出金','2013-08-05','10:49:51.187' union all
select 10609,'转帐:出金','2013-08-05','10:50:01.217' union all
select 10734,'转帐:入金','2013-08-08',' 10:31:58.680' union all
select 10735,'转帐:出金','2013-08-08','10:33:44.543' union all
select 10736,'转帐:出金','2013-08-08','10:34:03.610' union all
select 10742,'转帐:入金','2013-08-08',' 13:48:15.300' union all
select 10743,'转帐:入金','2013-08-08',' 14:01:10.020' union all
select 10744,'转帐:入金','2013-08-08',' 14:01:19.007' union all
select 10745,'转帐:入金','2013-08-08',' 14:02:11.123' union all
select 10746,'转帐:入金','2013-08-08',' 14:02:28.673' union all
select 10747,'转帐:入金','2013-08-08',' 14:07:43.147' union all
select 10748,'转帐:入金','2013-08-0