Viewing 15 posts - 781 through 795 (of 1,424 total)
The nested subqueries seem not to be necessary imo. What is the point of selecting the top 15 rows only to select the top 1 from that subset using the...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 5, 2021 at 10:30 pm
It appears the OP is referencing Excel functions and column arrays. In this query the calculated NewColumn equals the DesiredColumn.
drop table if exists #tTable;
go
create table #tTable(
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 5, 2021 at 12:31 pm
Awesome stats. Thank you good sir. And, based on your previous replies, the other 13 or so all start at "0"?
Yes, the other 13 start with 0, meaning 'dbo.fnTally(0,...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 4, 2021 at 3:47 pm
I use 2 monster .sql scripts to answer SSC/SO questions. One currently has 13,787 lines and contains 32 occurrences of 'fnTally' of which 24 specify the sequence begin with 1. ...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 4, 2021 at 1:17 am
Thanks for the feedback, Steve. So, from the sounds of it, you don't use a starting value of other than "0" or "1", correct?
Those are my two choices so...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 3, 2021 at 11:31 pm
Getting back to Itzik's challenge, I had a question form in my mind. As a pre-amble to the question, I've found that I use "1" as a starting number...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 3, 2021 at 10:47 pm
I think maybe it should be 'where c.id=o.cust_id' 🙂
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 3, 2021 at 6:29 pm
The table #tmpTabl specifies the column 'id' twice. Presumably the second 'id' is the unique identifier of the 'orders' table so here it's renamed as 'o_id'.
drop table...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 3, 2021 at 5:30 pm
How about "This string is a space separated string"?
will this function work?
By "work" if you mean "give the right answer" then no. It doesn't return any error though. But...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 26, 2020 at 1:15 pm
Yes the logic is broke. I agree with all of Alan's comments. It seems possible to take corrective steps using cte(s) and additional windowing functions where the cardinality of the...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 26, 2020 at 2:47 am
Hey, Jeff, will you update this yet again to include the new split_string() function in SQL Server 2016+?
Probably not. The STRING_SPLIT function is relatively crippled for those that...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 25, 2020 at 5:23 pm
drop table if exists #Stats2;
go
CREATE TABLE [dbo].#Stats2
([StatsDate] [datetime] PRIMARY KEY,
[TypeA_Calls] [int] NULL,
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 21, 2020 at 6:12 pm
What if there is more than one 'Period Key' for a (Support_Start_Date, Support_End_Date) pair?
Maybe you're looking for something like this? It returns multiple rows if the (Support_Start_Date, Support_End_Date) pair spans...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 18, 2020 at 9:56 pm
declare
@sql_prefix nvarchar(max)=N'select id.PartIdC, id.PartIdX,',
@sql_suffix nvarchar(max)=
N'from #InputData id
left join #partsdata p1 on...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 18, 2020 at 4:50 pm
I am currently trying to backfill data from an S3 bucket, to SQL server using Alteryx. Unfortunately, there is a lot of data and running a month at...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 18, 2020 at 2:40 pm
Viewing 15 posts - 781 through 795 (of 1,424 total)