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.
| Author |
Topic |
|
denfer
Starting Member
12 Posts |
Posted - 2007-11-13 : 08:58:37
|
| Hi,Here are my DataI have a list of Object 'Obj' that have several type of 'Task'Obj1 => Task1, Task2, Task3 Task4Obj2 => Task1, Task2, Task3 Task4Obj3 => Task1, Task2, Task3 Task4All the 'Obj' have the same number and type of 'Task'All this 'Obj' have the same 'Job'Obj1 => Job1Obj2 => Job1Obj3 => Job1Each 'Task' can have different 'Size', 'Position' and 'ObjID'Task1 => S11, P11, Obj1Task1 => S12, P12, Obj2Task1 => S13, P13, Obj3Task2 => S21, P21, Obj1Task2 => S22, P22, Obj2Task2 => S23, P23, Obj3Task3 => S31, P31, Obj1Task3 => S32, P32, Obj2Task3 => S33, P33, Obj3I need to get the list of 'Obj' that are identical.That mean that they have for ALL 'Task' Identical 'Size' and 'Position'.Obj1 and Obj2 are identical only if :S11 = S12 AND P11 = P21 ANDS21 = S22 AND P21 = P22 ANDS31 = S32 AND P31 = P32All the data are in the same tableTaskID, Size, Position, ObjID, JobIDI found a solution with two While loop but it's not fast enoughI someone has a solution Tha will be welcomeLet me know if you need more details |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-11-13 : 09:19:14
|
Wow! That was... nothing but amazing!No DDL, so sample data. No expected output, only logic to get output. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|
|
|