_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
FrontPage › Msg7342
|
|
[edit]
1 Msg #覃讌 7342, 譴 16, 1, 譴 2
郁屋 覯 "LinkedServerA" OLE DB 螻糾 "MSDASQL" "MSDASQL.login" 蠍一 NULL 螳 覦給. 伎 NULL 給. [edit]
2 T-SQL #declare @sql varchar(8000) set @sql = ' select login , logout from openquery([LinkedServerA], '' select login , logout from main.log_' + convert(char(6), getdate()-1, 112) + ''') WHERE login >= CONVERT(char(8), GETDATE()-1 , 112) AND logout < CONVERT(char(8), GETDATE() , 112) ' exec(@sql) [edit]
3 願屋 #declare @sql varchar(8000) set @sql = ' select cast(login as datetime) login --讌朱 cast , logout from openquery([LinkedServerA], '' select cast(login as char(50)) login --覓語朱 cast , logout from main.log_' + convert(char(6), getdate()-1, 112) + ''') WHERE login >= CONVERT(char(8), GETDATE()-1 , 112) AND logout < CONVERT(char(8), GETDATE() , 112) ' exec(@sql)
鏤
|
磯Μ螳 豕 ろ伎 伎 れ 螳り鍵 伎螳 . 豕 ろ 襷 讀蟆蟆 狩 蠍 覓語企. (る襯 襷ろ) |