create dynamic groups like; ABC, BCA, CAB, CBA...
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: create dynamic groups like; ABC, BCA, CAB, CBA...

  1. #1
    Join Date
    Jun 2006
    Posts
    1

    create dynamic groups like; ABC, BCA, CAB, CBA...

    I have two columns like, treatcode and groups
    If treatcode is 2 (A,B) then groups column should be
    AB, BA
    If treatcode is 3 (A,B,C) then groups column shoud be
    ABC
    BCA
    CAB
    CBA
    BAC
    ACB

    If treatcode is 4 (A,B,C,D) then groups column shoud be
    ABCD
    BCDA
    CDAB
    DABC
    ........

    Whenever the treatcode increases the groups should be increase.
    Please let me know is there any good approach for this?

    Thanks
    malli

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,483

    Cool


    Yes, write a PL/SQL function.
    "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