Viewing 15 posts - 631 through 645 (of 1,413 total)
It seems the data is ordinally JOIN'ed between PersonAttending and Type and CROSS JOIN'ed between PersonAttending and Owner. To do the ordinal splitting this uses dbo.DelimitedSplit8K_LEAD. Ordinal splitters and specifically...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
July 11, 2021 at 5:10 pm
Similar to the accepted solution but without the common table expression. It appears Jeff began to code it one way and then switched
select max(case when sp2.ItemNumber=1 then...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
July 11, 2021 at 11:21 am
The additional rows were generated using dbo.fnTally
select case when fn.n=0 then k.CDMLOCID else '"' end CDMLOCID,
case when fn.n=0 then...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 24, 2021 at 12:22 pm
Hmmm it's hard to be certain without testing. I've had issues with inserts of multiple rows with the same system datetime into System Versioned tables. It's the "simultaneous" part it...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 19, 2021 at 1:34 pm
If I'm understanding this could this be done in the WHERE clause with a bunch of OR conditions.
select *
From Master as pom
WHERE Pom.UserID = @userid
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 17, 2021 at 11:37 am
Have a look at the Docs for SUBSTRING
SUBSTRING ( expression ,start , length )
When the CASE statement is evaluated as TRUE, because you're adding +1 to the length LEN...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 12, 2021 at 3:05 pm
Yes the repository is the better place for the code. There are going to be many changes and now this thread seems incomplete. Maybe it makes sense to start over...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 10, 2021 at 8:06 pm
Hi Steve Jones, when these posts were consolidated from what were originally 7 separate threads it appears a post(s)? containing the DDL and explanation for having a System Version'ed edition...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 10, 2021 at 5:06 pm
It's been a few weeks since there's been an update. We've had some work upheaval and also my son's 6th Birthday party and the Memorial Day holiday. Workwise I've been...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 8, 2021 at 7:56 pm
The function could be included in the SELECT list
select lcd.LoggerDownloadTableName,
smalldatetimefromparts(substring(lcd.LoggerDownloadTableName, 18, 4),
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 8, 2021 at 2:36 pm
You could try SMALLDATETIMEFROMPARTS
select v.input,
smalldatetimefromparts(substring(v.input, 18, 4),
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 8, 2021 at 1:43 pm
The least friction way imo seems to be to split each character using fnTally and convert to ASCII values. Then re-aggregate the string. Something like this (with extra non-[a-z][0-9]) characters...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 8, 2021 at 11:28 am
You could try something like this
select ph.PolId,
case when isnull(pa_est.est_count, 0)>0
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 4, 2021 at 6:05 pm
Sure, the function is described in this really nice article. This is the code I use
CREATE FUNCTION [dbo].[fnTally]
/**********************************************************************************************************************
Jeff Moden Script on SSC:...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 4, 2021 at 1:27 pm
This query is really close but maybe there's an inconsistency issue with the 'tab1_result' query?
with tab1 as
(
select 101 as id, 'abc' as area,'2021-01-07'...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 4, 2021 at 12:57 pm
Viewing 15 posts - 631 through 645 (of 1,413 total)