Viewing 3 posts - 1 through 4 (of 4 total)
Yes. Thank you. Will do in the future.
August 23, 2016 at 6:12 am
Sorry Drew.
Tables
1.tablexm
(1_id(nvarchar(50),
2_id(nvarchar(50))
2.item_relation_table
(parent_id (nvarchar(50),
child_id(nvarchar(50),
relation(char(1)))
3.item
(product_id(nvarchar(50),
item_name(nvarchar(750)),
item_desc(text),
mfg(nvarchar(50)),
active(char(1)))
Sample Data
tablexm
BAT 12355, BER 222222
BAT 12355, CVF 234455
ART 11111, VFF HHHHH
item_relation
BAT 12355, BER 222222, A
BAT 12355, CVF 234455, A
item
BAT 12355, Baseball bat, Normal bat, BAT 12355,...
August 22, 2016 at 4:14 pm
Thanks for the responses. Here is my code currently:
INSERT INTO item_relation_table
(parent__id,
child__id,
relation)
SELECT xm.1_id, xm.2_ID,
'A',
from tablexm xm
where xm.1_id != xm.2_ID and
exists(select 1 from item ip WHERE ip.mfg = xm.1_id and...
August 22, 2016 at 2:46 pm
Viewing 3 posts - 1 through 4 (of 4 total)