I like to get a function which accepts an array of values and return me all possible combination.
Ex: A,B,C is the array of values passed to the function and below is the expected output.
A B C AB AC BC ABC
Even though AA, BB, CC is possible, but I don't like to return that combination because both numbers are equal.
Can some one please give me the sql query.
Thanks Sql Beginner
asked Apr 30, 2010 at 01:43 AM in Default
use fnParseList from http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76033
answered Apr 30, 2010 at 02:50 AM
Hi I have one requirment and need to do one job. Please help me
I want to a sql query to get all combinations for n strings and r pickups i.e ncr formula(ncr=n!/r!*(n-r)!) For example: RED,GREEN,YELLOW,BLUE,VOILET,BLACK,ORANGE so toal 7 colours right? but out of 7 i want choose 3 colours only. For this How many combinations will we get