m******t 发帖数: 6905 | 1 Hi all
I created a table and tried the solution above but it failed. who can help
--Creat Table and loading data by using bulk insert
Drop Table Test20140317
Create Table Test20140317
(SalesDate date,
Sales Decimal)
Bulk insert Test20140317
from 'C:\filepath\Book1.txt'
with
(ROWTERMINATOR = '\n',
firstrow = 2)
select * from Test20140317
--Here is the above solution, I used DateName function to display week days.
select
Month(SalesDate),
case when DATENAME(WEEKDAY,(SalesDate)) = 0 then ... 阅读全帖 |
|