Viewing 15 posts - 541 through 555 (of 1,419 total)
Hold a sec, the code above is making multiple replacements of the same character. 7 replaces 1 then 5 replaces 7. The reason seems to be because the order of...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
This is one of those gray areas... or idk maybe someone can explain why this actually works. For reasons unknown, afaik when the REPLACE function is used in the righthand...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
Yes a calendar table is another workable approach. What if the minDate and/or maxDate is other than the 1st or last day of the month? Maybe something like this
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
Yes sorry. It should've been included. The code is from Jeff Moden's article here on SSC. It comes in handy in many places
CREATE FUNCTION [dbo].[fnTally]
/**********************************************************************************************************************
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
For the counting to begin at 1 maybe you could assign the value 1 to rows where the status is null. Then UNION ALL for the additional rows with the...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
There are different date calculations depending on granularity. This seems to work
drop table if exists #foo;
go
create table #foo(
[Table] sysname,
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
Hi Joel, maybe something like this. It's pretty self-explanatory once you run it
drop table if exists #foo;
go
create table #foo(
[datetime] datetime,
tonsperhour...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
Viewing 15 posts - 541 through 555 (of 1,419 total)