How can we help you today? How can we help you today?

SQL Server solution

Starting from the TABLE1 source table that contains consecutive value groups (which can reach hundreds of thousands of items) in the Serie field, we need to get to the TABLE2 table that contains the consecutive value groups, but without another grouping field in the TABLE1 table . I have implemented several solutions (recursive CTE, Cursor FETCH-ing, Self-Join on TABLE1, ... ) but none is fast enough. It's about hundreds of thousands of articles ... maybe more.
ygrr1w20pii5.png

Indebted.
biweb
0

Comments

4 comments

  • Eddie D
    Hi, thank you for your forum post.

    I am sorry, I am confused. What does the information in your post has in regards to Redgate's SQL Test application?
    Eddie D
    0
  • biweb
    I just asked for help. But in the meantime I have found the solution sought, worthy of an architect. I apologize for inappropriateness.
    Best regards.
    biweb
    0
  • Eddie D
    Hi, thank you for your reply and good to read that you found a solution to your question.

    Unfortunately you posted your question in the SQL Test forum. If you have any questions, that are not Redgate product specific, in the future please post in the general forum available via this link:
    https://forum.red-gate.com/categories/general-forum

    Many Thanks
    Eddie

    Eddie D
    0
  • joon

    Ah, det klassiske "jeg spurgte i det forkerte forum, men fandt selv svaret, mens jeg ventede på et svar" scenarie. Det sker for os alle sammen! Godt at du fandt en løsning, der er arkitekt-tilladelsen værd, biweb.

    Nogle gange, når man sidder fast i et komplekst problem, hjælper det bare at tage et skridt tilbage og forklare det (selv i det forkerte forum) – det tvinger hjernen til at finde svaret. Det er lidt ligesom at løse et genstridigt krydsord. Man stirrer på en ledetråd i timevis, og pludselig falder brikkerne på plads, når man holder op med at presse sig selv så hårdt.

    Hvis du nogensinde har brug for en pause fra rekursive CTE'er og SQL-optimering, er et hurtigt ordpuslespil en god måde at nulstille hjernen på. Du kan finde et gratis dagligt et via denne kilde.

    Tak fordi du holder forummet organiseret, Eddie!

    joon
    -1

Add comment

Please sign in to leave a comment.