DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Query :(

  1. #1
    Join Date
    Feb 2013
    Posts
    1

    Query :(

    Hi

    In below data A will come only once and D will always be followed by B. D can be 2 or 3 in number after B.
    I need to write a query so that slect query comes like

    ABD, ABDDD , ABD and so on . All B,D are different from each other and should be in order.
    Here A will always with the B and D will always followed by B. Its vwery complex for me . Can anybody please help on this.

    A
    B
    D
    B
    D
    B
    D
    B
    D
    B
    D
    B
    D
    D
    B
    D
    B
    D
    B
    D
    D
    B
    D
    D
    B
    D
    D

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Thumbs down

    Besides...the data you posted does not reflect the results you posted.

    You will need to: a) Provide a working test case with create table/insert statements and b) Provide the proper rules to generate the output you expect.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width