add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
SET NOCOUNT ON



drop table if exists #tmp;

DECLARE @Item TABLE(
ItemId INT,
Name VARCHAR(25)
);

INSERT INTO @Item( ItemId, Name)
VALUES(1,'Item 1'),
(2,'Item 2');

DECLARE @Property TABLE(
PropertyId INT,
Name VARCHAR(10)
);

INSERT INTO @Property(PropertyId,Name)
VALUES( 1,'Property 1'),
(2,'Property 2'),
(3,'Property 3');

DECLARE @ItemProperty TABLE(
ItemId INT,
PropertyId INT
);

INSERT INTO @ItemProperty(ItemId,PropertyId)
VALUES(1,1),(1, 2),( 2, 2),(2,3);

--select *
--from
--(
JSON_F52E2B61-18A1-11d1-B105-00805F49916B
{"itemID":1,"Name":"Item 1","Property 1":true,"Property 2":true,"Property 3":false}
JSON_F52E2B61-18A1-11d1-B105-00805F49916B
{"itemID":1,"Name":"Item 1","Property 1":true,"Property 2":true,"Property 3":false}