splitting rows sql


can someone greatfully let me know opposite segments 3 rows intersecting opposite ways controlling sql? 3 rows #t2 paint sets a,b, c - i am looking i b, i c, b i c, i b i c, a' , b', c' etc., (7 illusory segments 3 rows venn diagram) where i intersection.



i am looking general fortitude hoop n array rows #t2.



-- sql formula begin
create list #t1 (key1 int, key2 int) -- any key1 there 1 some-more key2
go
create list #t2 (row_id int identity(101, 1), key1 int) --row_id primary key
go

insert #t1
select 1, 11 kinship name 1, 12 kinship name 1, 13 kinship name 1, 14 kinship
select 2, 13 kinship name 2, 15 kinship name 2, 16 kinship name 2, 17 kinship
select 3, 13 kinship name 3, 12 kinship name 3, 16 kinship name 3, 17

-- 1 --> 11, 12, 13, 14
-- 2 --> 13, 15, 16, 17
-- 3 --> 13, 12, 16, 17

insert #t2 (key1)
select 1 kinship name 2 kinship name 3

-- sql formula end


the cost i am looking is,



1001  11 (a')
1001 14 (a')
1002 12 (a i c - i b i c)
1003 13 (a i b i c)
1004 15 (b')
1005 16 (b i c - i b i c)
1005 17 (b i c - i b i c)


the cost 5 segments, instead illusory 7 twin null.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?