查一下本周的号码?
我知道如何查找本周编号:
(SELECT DATEPART(wk, GETDATE()))
我需要知道获取周编号与另一个表进行比较的语法: 句法:
SELECT THISWEEK -- WEEK NUMBER DATA
FROM dbo.DATETABLE
WHERE THISWEEK = (DATEPART(wk, GETDATE())) -- THIS IS THE PART I AM NOT SURE.
I know how to look up this week number:
(SELECT DATEPART(wk, GETDATE()))
I need to know the syntax of getting the week number compare to another table:
SYNTAX:
SELECT THISWEEK -- WEEK NUMBER DATA
FROM dbo.DATETABLE
WHERE THISWEEK = (DATEPART(wk, GETDATE())) -- THIS IS THE PART I AM NOT SURE.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这对我来说看起来不错。
This looks good to me.
这是正确的语法。 你的括号数量超过了必要的数量,但这并没有什么坏处。
相当于说:
That's the correct syntax. You have more than the necessary amount of parens, but it does no harm.
Is equivalent to saying: