Viewing 15 posts - 1,246 through 1,260 (of 1,360 total)
Yea yea, I know or I noticed after I posted that. Instead of eomonth() you could use:
dateadd(day,-1,dateadd(month,1,@test_month))
Then you could use a tally table and dateadd function. Or...
October 8, 2019 at 2:01 pm
This is an application for Jonathan's daterange function. Here is his article:
https://www.sqlservercentral.com/scripts/a-daterange-table-valued-function
Something like this:
declare
@input_yearint=2019,
@input_monthint=9;
declare
@test_monthdate=datefromparts(@input_year,@input_month,1);
select
...
October 6, 2019 at 11:44 pm
I'm thinking of check where the status is that of 12 as in the example for a month period, this is done via a mechanism of a table that...
October 5, 2019 at 5:51 pm
The top(1) protects from row expansion due to the inequality on date. That was the part I wasn't getting.
October 5, 2019 at 5:38 pm
If I'm understanding correctly there's a table with many status columns per userid. When any of the statuses change a new record is inserted which duplicates the unchanged statuses. Fyi,...
October 5, 2019 at 2:09 pm
dotPeek could decompile the dll's if you'd like to see the source code. It's free and there's no registration or email required to download and install it.
October 4, 2019 at 12:36 pm
I agree with James one transaction would likely be a good idea. To see how the trancount changes with successive trans/commits:
drop proc if exists temp_proc;
go
create proc temp_proc
as
begin
drop...
October 2, 2019 at 1:00 pm
Something going on with your quotes. The url should be in single quotes. There should be a quote before POST also.
October 1, 2019 at 10:51 am
Merge statements are good for "make these rows look like those rows" situations. There are plenty of other uses too. Unlike UPDATE, DELETE, etc. MERGE is not a single atomic...
September 29, 2019 at 3:13 pm
You say you're looking for a "better solution" so could you please provide the current solution? Can't say if something is better if we can't see what it's being compared...
September 29, 2019 at 2:35 pm
Jonathan's is the most correct. Mine only mimics your demo output and it's 2012+.
September 27, 2019 at 4:34 pm
/* test data */
drop table if exists #test_apps;
go
create table #test_apps(
AppNumberint not null,
Employeenvarchar(64) not null,
Time_generatedatdatetime2 not null);
go
insert #test_apps(AppNumber, Employee, Time_generatedat) values
(143270137,'shiva', '2019-09-23...
September 27, 2019 at 1:36 pm
Yes it's part of SSIS but honestly: I can make SQL Servers fly but creating C# Code which aswell flies on SQL Server is a completely different story therefore...
September 26, 2019 at 3:49 pm
Ok, yeah that's right. I was thinking of something else
September 20, 2019 at 8:12 pm
Viewing 15 posts - 1,246 through 1,260 (of 1,360 total)