3 Replies Latest reply on Oct 13, 2006 8:20 AM by Stressed_Simon

    get query records' combinations

    cUrLiTo
      Hi all,

      This is my 1st post and I really hope the question hasn't alredy been posted cause i did a search and found nothin'.

      What I need is to get the combinations of the records I get from a SQL Query.

      For example:

      If the query's records are:

      record01
      record02
      record03
      record04

      I want to also output:

      record01
      record02
      record03

      &

      record01
      record02
      record04

      &

      record01
      record03
      record04

      &

      record02
      record03
      record04

      I need the same thing for the 2 records combinations as well..

      record01
      record02

      &

      record01
      record03

      and goes on...(6 combinations of 2 records out of total4)

      The query's length isn't always 4. It can be from 1 to infinite.

      Any help appreciated.