Viewing 15 posts - 691 through 705 (of 26,490 total)
Now, show use what you have tried to solve your problem.
Also, the following is a much better way to post the DDL, sample data, and expected results, which I...
November 7, 2018 at 11:48 am
Now, show use what you have tried to solve your problem.
Also, the following is a much better way to post the DDL, sample data, and expected results, which I...
November 7, 2018 at 11:20 am
It may still need some more work as it isn't fully tested against all possible scenarios of data.
November 6, 2018 at 2:05 pm
Sort of like this:
create table [dbo].[mytable]
(
[StartDate] date not null primary key
, [CalendarMonth] as datepart(month,[StartDate]) persisted
, [CalendarYear] ...
November 6, 2018 at 12:32 pm
Also, you really shouldn't be using a loop for this. You could put this into the table from your other thread.
November 6, 2018 at 12:27 pm
November 6, 2018 at 12:10 pm
It probably needs some additional work but I will leave that to you to at least attempt first. Questions or problems please come back here.
November 6, 2018 at 12:07 pm
Here is a partial solution. It doesn't incorporate the WHERE clause for the time sheet information.
/****************************************************************************************
Generate employee data
****************************************************************************************/
if object_id('[dbo].[Employee]','U') is not null
...
November 6, 2018 at 12:04 pm
Use the table in your other thread here, https://www.sqlservercentral.com/Forums/2008707/get-qtrmonth-and-year-from-start-date?Update=1#bm2008841, using the [fy_year] and [fy_month] columns to create the YYYY-MM, like this:
CAST([fy_month] as varchar(4)) + '-' + right('0' + cast([fy_month] as...
November 6, 2018 at 10:47 am
Just one thing missing, to get the expected results how is the query run. I am trying to figure out how the employees come together using the start and end...
November 6, 2018 at 10:05 am
November 6, 2018 at 9:49 am
November 6, 2018 at 9:48 am
Viewing 15 posts - 691 through 705 (of 26,490 total)