_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
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)
鏤
|
蠖 襴 襾碁朱 讌 . 蠏碁り 螻手碓襯 蟆渚讌 . 襯企 覓手骸 螳 覃 覦 覦 朱 螳 訖企. |