Forum Replies Created

Viewing 15 posts - 1 through 15 (of 1,413 total)

  • Reply To: Running a Parameter-Sensitive Stored Procedure on a Secondary Replica

    In SQL Server 2022 they added a bunch of features which theoretically could be employed, like PSP "Parameter Sensitive Plan" optimization which stores more than 1 plan for a proc. ...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: How Do the Experts Become Experts?

    Short answer: the F5 button.

    Back in the day, like the 90's, I worked for a music "record label" where the talent reps could send an email to request@datalab.xyx (not the...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Install SQL Scripts via GUI Wizard

    A GUI sems like a good approach until you have to build one lol.  What about a stored procedure to generate the scripts?  Step 1: tokenize the parameters in the...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Missing numbers in a series

    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

  • Reply To: Missing numbers in a series

    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

  • Reply To: Missing numbers in a series

    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

  • Reply To: Missing numbers in a series

    naumon765 wrote:

    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

  • Reply To: Find a string with two dots

    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

  • Reply To: find whether a upper case letter is there in a given string

    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

  • Reply To: What Can AI Really Do?

    David.Poole wrote:

    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

  • Reply To: What Can AI Really Do?

    David.Poole wrote:

    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

  • Reply To: Dynamic Unpivot

    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

  • Reply To: Dynamic Unpivot

    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

  • Reply To: Dynamic Unpivot

    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

  • Reply To: Dynamic Unpivot

    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

Viewing 15 posts - 1 through 15 (of 1,413 total)