|
|
|
|
use saidao_appserver
|
|
|
|
|
|
|
|
|
|
SELECT * FROM TClient WHERE FConnectionString LIKE '%m.weixin%'
|
|
|
|
|
|
|
|
|
|
DELETE TClient WHERE FClientId IN()
|
|
|
|
|
|
|
|
|
|
USE YunCheng_ShouXuan
|
|
|
|
|
|
|
|
|
|
SELECT CONVERT(VARCHAR,FTime,23) FROM TMemberCourseLog WHERE FBillType = ''
|
|
|
|
|
GROUP BY CONVERT(VARCHAR,FTime,23)
|
|
|
|
|
ORDER BY CONVERT(VARCHAR,FTime,23)
|
|
|
|
|
|
|
|
|
|
SELECT *FROM TMemberCourseLog WHERE FBillType = ''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SELECT * FROM TBizLog WHERE FDescription = '<EFBFBD><EFBFBD><EFBFBD>Ƴ̴<EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE FUNCTION FNGetMemo
|
|
|
|
|
(
|
|
|
|
|
@Text VARCHAR(2000)
|
|
|
|
|
)
|
|
|
|
|
RETURNS VARCHAR(111)
|
|
|
|
|
AS
|
|
|
|
|
BEGIN
|
|
|
|
|
RETURN SUBSTRING(@Text,CHARINDEX('<EFBFBD><EFBFBD>ע:',@Text)+3,LEN(@Text))
|
|
|
|
|
END
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DROP FUNCTION FNGetCourseId
|
|
|
|
|
GO
|
|
|
|
|
CREATE FUNCTION FNGetCourseId
|
|
|
|
|
(
|
|
|
|
|
@Text VARCHAR(2000)
|
|
|
|
|
)
|
|
|
|
|
RETURNS VARCHAR(111)
|
|
|
|
|
AS
|
|
|
|
|
BEGIN
|
|
|
|
|
RETURN SUBSTRING(@Text,CHARINDEX('<EFBFBD><EFBFBD>Ա<EFBFBD>Ƴ<EFBFBD>ID:',@Text)+7,19)
|
|
|
|
|
END
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE #Log
|
|
|
|
|
|
|
|
|
|
SELECT dbo.FNGetMemo(FContent)
|
|
|
|
|
AS FMemo, dbo.FNGetCourseId(FContent)
|
|
|
|
|
AS FCardId,FTime
|
|
|
|
|
INTO #Log
|
|
|
|
|
FROM TBizLog
|
|
|
|
|
WHERE FDescription = '<EFBFBD><EFBFBD><EFBFBD>Ƴ̴<EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
|
|
|
|
|
SELECT * FROM #Log
|
|
|
|
|
|
|
|
|
|
SELECT A.FCardId,A.FMemo FROM #Log AS A,TMemberCourseLog AS B
|
|
|
|
|
WHERE B.FCardId = A.FCardId
|
|
|
|
|
AND B.FBillType = ''
|
|
|
|
|
AND ABS(DATEDIFF(SECOND, B.FRecordTime , A.FTime)) < 3
|
|
|
|
|
|
|
|
|
|
UPDATE B SET B.FMemo = A.FMemo
|
|
|
|
|
FROM #Log AS A,TMemberCourseLog AS B
|
|
|
|
|
WHERE B.FCardId = A.FCardId
|
|
|
|
|
AND B.FBillType = ''
|
|
|
|
|
AND ABS(DATEDIFF(SECOND, B.FRecordTime , A.FTime)) < 3
|
|
|
|
|
|