Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 All Unique Combination

Author  Topic 

hksharmaa
Starting Member

16 Posts

Posted - 2011-03-07 : 03:59:15
Dear All..

I have an Table A Which have 1 Column and 5 rows..

TABLE A
Col.1
1
2
3
4
5

Now i want to insert in Table B all Different Combinations in a set of 3 that can be made through Table A in Column 1 and assign a unique No. in Column2 for a unique set of 3 nos.

TABLE B
Col.1 Col.2
1 S1
2 S1
3 S1

1 S2
3 S2
5 S2

2 S3
3 S3
5 S3

AND SO on...

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2011-03-07 : 04:09:16
please do not cross post.

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=157809


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -