Viewing 15 posts - 616 through 630 (of 1,424 total)
This uses a tally function (or it could be called a "numbers function") twice. Once, to generate the total hourly datetime range across all rows in table #t. Second, to...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 20, 2021 at 5:30 pm
select *, dateadd(hour, datediff(hour, 0, in_datetime), 0) out_datetime
from #data;
[EDIT] Same answer as Ant-Green but 2 minutes later 🙂
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 20, 2021 at 12:25 pm
select left(isnull(stuff(first_name, 11, 3, '...'), first_name), 13)
from @t1;
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 19, 2021 at 10:40 am
Another alternative could be CROSS APPLY
update t
set AmountAll = ca.sum_amount
from #test t
cross apply (select sum(tt.Amount)
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 18, 2021 at 11:45 am
As long as people are sharing their CSV secrets. Warning disclosure this contains C# code. A couple of years ago I worked on a project for a fitness tracking system...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 16, 2021 at 7:47 pm
Could you post the CREATE TABLE statement for your date table? I'd like to try a couple of things.
To start with maybe the OP could use a rental periods...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 16, 2021 at 1:24 am
Another alternative using kaj's set up data
with cc_cte(cc1, cc2) as (
select iif(row_number() over (order by Timestamp desc)=1, CallCount, 0) cc1,
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 15, 2021 at 11:04 pm
The tone of this response has changed significantly since the notification email I got, with its contents. I was going to remind you that sites like this have "points"...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 13, 2021 at 3:19 pm
Welp, it seems worthwhile mentioning reputation points in an online forum, i.e. Stack Overflow, are a good way to enhance your resume.
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 13, 2021 at 1:42 pm
But before we even think of getting started on this, let's NOT do it here. Let's open a separate thread and have the OP provide some reasonable sample data...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 11, 2021 at 3:07 pm
There are some caveats which should've been mentioned. The string is declared as NVARCHAR(MAX) because I don't know that that's not appropriate. The ordinal splitter is name '%8K_LEAD' because it's...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 11, 2021 at 2:42 pm
The issue with parsing is there are 6 different delimiters (including 'Supervisor') when you really only need 1. With 1 delimiter an ordinal splitter (which is based on a tally...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 11, 2021 at 2:08 pm
It's the same idea with a clock as with a calendar
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
July 27, 2021 at 12:46 pm
It appears spacing within certain code blocks have been removed. It appears to be retroactive across history too.
In my most recent response the spaces in the results code block appear...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
July 27, 2021 at 12:32 pm
"...is it possible to determine the number of years to be able to iterate them and in each turn set the new dates?"
To determine the number of years "to iterate"...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
July 27, 2021 at 12:12 pm
Viewing 15 posts - 616 through 630 (of 1,424 total)