Viewing 15 posts - 526 through 540 (of 1,403 total)
You feel misled? It's an axiomatic statement of equivalency
October 25, 2021 at 5:30 pm
Your code also has zeros just disappear completely from your results. It's never explicitly stated that zeros can't appear in these numbers. Just in case they do, I think...
October 25, 2021 at 4:44 pm
Is that code fundamentally different than the first query I posted using the same method?
No temp table
No Cartesian product without row goal, i.e. SELECT TOP(n)
No LEFT JOIN
No ISNULL
October 25, 2021 at 3:51 pm
Sorry it's not clear to me. Maybe a more detailed example could help
October 24, 2021 at 5:57 pm
What are the expected Usage and Result values for each row of the @t table?
October 24, 2021 at 4:40 pm
maybe something like this
select ic.NumericValue,
stuff((select '' + v.repl
...
October 24, 2021 at 12:59 pm
The REPLACE method maybe is not appropriate here but I still would like to know how that works. Anyway, given this is version 2016 maybe something like this
October 23, 2021 at 4:29 pm
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...
October 23, 2021 at 2:20 pm
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...
October 23, 2021 at 12:21 pm
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
October 22, 2021 at 12:40 pm
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]
/**********************************************************************************************************************
...
October 21, 2021 at 3:18 pm
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...
October 20, 2021 at 1:38 pm
There are different date calculations depending on granularity. This seems to work
drop table if exists #foo;
go
create table #foo(
[Table] sysname,
...
October 20, 2021 at 2:39 am
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...
October 19, 2021 at 5:45 pm
Maybe you're looking for something like this. It assumes there's a primary key column in the OfenbuchVC1212_V10 table called 'OfenbuchId'. After update of the OfenbuchVC1212_V10 table the trigger first determines...
October 14, 2021 at 6:20 pm
Viewing 15 posts - 526 through 540 (of 1,403 total)