var targetElement = document.querySelector('#container');
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
// perform the required actions here...
console.log(mutation.type);
});
});
observer.observe(targetElement, { attributes: true, childList: true, characterData: true });
答案 0 :(得分:1)
在SQL Server中,您不能简单地将布尔比较作为when
子句。
因此,请在when
中包含条件并明确返回值:
(case when @mode = 'TwoDays' and
CenterMeetingDay between datepart(dw, GETDATE() - 1) and DATEPART(DW, GETDATE() + 1)
then 1 else 0
end) as CenterMeetingDay
在where
子句中,您可以执行以下操作:
where ( (@mode = 'TwoDays') and CenterMeetingDay between datepart(dw, GETDATE() - 1) and DATEPART(DW, GETDATE() + 1)) or
( (@mode <> 'TwoDays' . . . )
或:
where (case when @mode = 'TwoDays' and
CenterMeetingDay between datepart(dw, GETDATE() - 1) and DATEPART(DW, GETDATE() + 1)
then 1 else 0
end) = 1