Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 12th, 2003, 08:47 AM
Authorized User
 
Join Date: Sep 2003
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Default Complex Set problem

Hi everyone again,

I am stuck again. SQL really is not my thing :-( Consider the following table again:

ID TESTNUMBER STATE VALUE
1 100 1 0
2 100 1 1
3 100 2 1
4 100 2 0
5 101 1 1
6 101 1 0
7 101 2 1
8 101 2 0
9 103 1 1
10 103 3 1

Now, I have to get all TESTNUMBER which have different sets of State and Values. So, this table will return 2 sets...

Set 1:

1 0
1 1
2 0
2 1
(Since, 100 and 101 share a common set)

Set 2:
1 1
3 1
(102 does have an identical set as 100 and 101. Common items are allowed but the sets must be identical (same elements))

Any suggestions on how to achieve this?

Thanks a lot,
Pankaj






Similar Threads
Thread Thread Starter Forum Replies Last Post
Schema Complex element with restriction problem [email protected] XML 1 June 27th, 2006 11:45 AM
Unsolved Complex C Structure Marshall Problem [email protected] C# 0 November 11th, 2005 06:43 AM
Complex execCommand() problem Snib Javascript 0 June 15th, 2004 06:08 PM
COMPLEX QUERY PROBLEM nikosdra SQL Server ASP 15 August 4th, 2003 06:17 PM
COMPLEX QUERY PROBLEM nikosdra Classic ASP Databases 2 July 28th, 2003 02:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.