0
上的asp.net應用程序運行的網格圖,它我想僅某些小時某些列之間顯示,SQL選擇,如果時間範圍內顯示特定的小時某些列
`IF ((datepart(hh, getdate())) between 5 and 18
SELECT
,[Hour5],[Hour6],[Hour7],[Hour8],[Hour9],[Hour10],[Hour11],[Hour12],
[Hour13],[Hour14],[Hour15],[Hour16],[Hour17],[Hour18]
FROM [DB]
IF ((datepart(hh, getdate())) between 18 and 5
SELECT
,[Hour18],[Hour19],[Hour20],[Hour21],[Hour22],[Hour23],[Hour0],
[Hour1],[Hour2],[Hour3],[Hour4],[Hour5]
FROM [DB] `
太感謝你了,我可以在邏輯錯誤工作,但如果語法錯了我不能:) – MvdM