Viewing 15 posts - 16 through 30 (of 1,424 total)
Ha, ok that's a nice inversion of the problem. Nicely done. Posting code in a forum is an invitation for nitpicking of course. One assumption baked into the query is...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
May 26, 2026 at 4:29 pm
DECLARE @MissingNumbers TABLE (N INT primary key not null);
INSERT @MissingNumbers(N)
VALUES (1),(2),(4),(5),(7),(8),(11),(12),(13),(15),(17),(19),(20),(102);
--Steve's query (based on Paul White's query, which is based on Jeff Moden's query)
SELECT GapStart = Lo.LoN,
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
May 26, 2026 at 1:13 pm
The original post: "I have the data like 1,2,4,5,7,8,11,12,13,15,17,19,20. How to find the missing numbers in the series?"
If the data is like, or similar, to the series provided as an...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
May 26, 2026 at 2:24 am
hi hope this helps
Fwiw, this is the 2K8 forum. LEAD and STRING_SPLIT were not available. Also, where is 10? It's skipped in the list of missing. The column labeled...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
May 24, 2026 at 7:17 pm
Jeff's question is really an open issue. As written the requirement isn't clear so what does "not working" mean? The predicate should already exclude values with two or more dots:
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
May 21, 2026 at 1:14 pm
This is an ancient topic. Doesn't matter to me tho. Looking through these answers I don't see one I like. The LOWER() solutions express the test indirectly. The _CS_ collations...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
May 21, 2026 at 11:12 am
I used Claude to help write a "skill" to carry out a task. The actual code worked fine, ...
It seems reasonable to infer there was a detailed prompt...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
May 19, 2026 at 12:59 pm
I'm finding that in some cases, Claude absolutely amazes me. In others, it fails and not in situations where you'd expect it to struggle.
Claude's a prickly pear. I've found...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
May 18, 2026 at 1:16 pm
Afaik if the column list is variable it's not possible to unpivot without dynamic SQL. On a per table (or schema) basis if the columns are known then you could...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 19, 2026 at 12:55 pm
Yes that answers it. It seems possible to create an iTVF per table/schema (if it's hard coded explicitly referencing columns and table(s)) that gives users what they're looking for. Not...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 7, 2026 at 3:40 am
The design is annoying but maybe not unfixable if you could encapsulate access (queries, views, etc.). Imo the bigger issue is whether the table(s) store when things happened (datetime per...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 6, 2026 at 5:24 pm
Hi Pieter,
Once you unpivot into (Symptom, Grade, Causality, Relatedness) you’ve gotten rid of the original “slot” number (the 1, 2, 3 suffixes). Maybe that matters? It might if you later...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
March 6, 2026 at 3:09 pm
Maybe the issue is the query could possibly be more efficiently evaluated if expressed as two queries. It always depends on the actual situation with cardinalities and indexes etc. If...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
February 7, 2026 at 12:14 am
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 14, 2026 at 1:17 am
Sure redesign if possible. As far as the task at hand it depends on the number of rows really. If there are a good many rows then allocating a temp...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 7, 2026 at 8:09 pm
Viewing 15 posts - 16 through 30 (of 1,424 total)