Pattern help in SQL

  • Hey all,

    Glad to be part of this community. I have ran into a problem with my database that involves a pattern. I know that I need to use 2 loops, but I don't know how to set it up. This is the general structure of it

    1 1

    2 1 2

    3 1 2 3

    4 1 2 3 4

    5 1 2 3 4 5

    6 1 2 3 4 5 6

    7 1 2 3 4 5 6 7

    8 1 2 3 4 5 6 7 8

    9 1 2 3 4 5 6 7 8 9

    10 1 2 3 4 5 6 7 8 9 10

    I am guessing it has something along the lines of declaring multiple variables, but again i am unsure of where to start. Again, this is the basic structure of it. I have altered the data, but i can easily change it once i get on trac

    Thanks again

  • You'll pardon me if I'm inaccurate, but this is similar to a classic homework problem.

    Please show what work you've done and we'll help you get unstuck. Check the first link in my signature as well, for how to provide the sample DDL and data to assist you.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply