|
|
|
|
SELECT * FROM TImpMember
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EXEC sp_rename 'TImpMember.<EFBFBD><EFBFBD> 0','FMemNo'
|
|
|
|
|
EXEC sp_rename 'TImpMember.<EFBFBD><EFBFBD> 2','FFaceNo'
|
|
|
|
|
EXEC sp_rename 'TImpMember.<EFBFBD><EFBFBD> 4','FName'
|
|
|
|
|
EXEC sp_rename 'TImpMember.<EFBFBD><EFBFBD> 25','FMobile'
|
|
|
|
|
EXEC sp_rename 'TImpMember.<EFBFBD><EFBFBD> 14','FCreateDate'
|
|
|
|
|
EXEC sp_rename 'TImpMember.<EFBFBD><EFBFBD> 15','FExpiredDate'
|
|
|
|
|
|
|
|
|
|
ALTER TABLE TImpMember ADD FGender INT
|
|
|
|
|
ALTER TABLE TImpMember ADD FBalance DECIMAL(18,6)
|
|
|
|
|
|
|
|
|
|
select * into #gcm12
|
|
|
|
|
from gcm12
|
|
|
|
|
where 1=0
|
|
|
|
|
|
|
|
|
|
SELECT * FROM gcm01 WHERE gca00c = '009'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SELECT CONVERT(VARCHAR,CAST(FCreateDate AS DATETIME),23) FROM TImpMember
|
|
|
|
|
|
|
|
|
|
insert gcm12(gcn00c,gcn01c,gcn02c,gcn03c,gcn04c,gcn09f,gcn10i,gcn12d,gcn13d,gcn15c,gcn16f,gcn17c,gcn22i,gcn24i,gcn33c,gcn34c,gcn35c)
|
|
|
|
|
select '009',FMemNo,'992',FName,LEFT(FMobile,11),FBalance,'0',LEFT(REPLACE(CONVERT(VARCHAR,CAST(FCreateDate AS DATETIME),23),'-',''),8),
|
|
|
|
|
LEFT(REPLACE(CONVERT(VARCHAR,CAST(FExpiredDate AS DATETIME),23),'-',''),8),
|
|
|
|
|
FMemNo,0,'009','1','1','admin','20170225','20170225'
|
|
|
|
|
FROM TImpMember
|
|
|
|
|
|
|
|
|
|
DELETE gcm12 WHERE gcn00c = '009'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from gcm12_lishi
|
|
|
|
|
|
|
|
|
|
SELECT * FROM gcm12 WHERE gcn00c = '009'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UPDATE TImpMember SET FGender = CASE WHEN [<EFBFBD><EFBFBD> 5] = '<EFBFBD><EFBFBD>' THEN 1 ELSE 0 END
|
|
|
|
|
|
|
|
|
|
UPDATE A
|
|
|
|
|
SET A.FBalance = B.[<EFBFBD><EFBFBD> 1]
|
|
|
|
|
FROM TImpMember AS A,TImpMember_Balance AS B
|
|
|
|
|
WHERE A.FMemNo = B.[<EFBFBD><EFBFBD> 0]
|
|
|
|
|
|
|
|
|
|
SELECT * FROM TImpMember_Balance
|
|
|
|
|
|
|
|
|
|
SELECT * FROM TImpMember WHERE FMemNO = '0008834171'
|
|
|
|
|
|
|
|
|
|
SELECT * FROM gsm02 WHERE gsb00c = '009'
|
|
|
|
|
|
|
|
|
|
UPDATE gsm02 SET gsb06c = '1',gsb06i = 1
|