1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
--productExtended_accessory
INSERT INTO [LocalDBName].[dbo].[productExtended_accessory] 
	SELECT peETL.* 
	FROM 
		[remoteServer].[remoteDBName].[dbo].[productExtended_accessory] peETL WITH (NOLOCK)
		LEFT OUTER JOIN [LocalDBName].[dbo].[productExtended_accessory] pePROD WITH (NOLOCK) ON peETL.id = pePROD.id
	WHERE pePROD.id IS NULL
	
	
--productExtended_category
INSERT INTO [LocalDBName].[dbo].[productExtended_category] 
	SELECT peETL.* 
	FROM 
		[remoteServer].[remoteDBName].[dbo].[productExtended_category] peETL WITH (NOLOCK)
		LEFT OUTER JOIN [LocalDBName].[dbo].[productExtended_category] pePROD WITH (NOLOCK) ON peETL.id = pePROD.id
	WHERE pePROD.id IS NULL
	
	
--productExtended_categoryAssociation
INSERT INTO [LocalDBName].[dbo].[productExtended_categoryAssociation] 
	SELECT peETL.* 
	FROM 
		[remoteServer].[remoteDBName].[dbo].[productExtended_categoryAssociation] peETL WITH (NOLOCK)
		LEFT OUTER JOIN [LocalDBName].[dbo].[productExtended_categoryAssociation] pePROD WITH (NOLOCK) ON peETL.id = pePROD.id
	WHERE pePROD.id IS NULL
	
	
--productExtended_description
INSERT INTO [LocalDBName].[dbo].[productExtended_description] 
	SELECT peETL.* 
	FROM 
		[remoteServer].[remoteDBName].[dbo].[productExtended_description] peETL WITH (NOLOCK)
		LEFT OUTER JOIN [LocalDBName].[dbo].[productExtended_description] pePROD WITH (NOLOCK) ON peETL.productID = pePROD.productID
	WHERE pePROD.id IS NULL
	
	
--productExtended_feature
INSERT INTO [LocalDBName].[dbo].[productExtended_feature] 
	SELECT peETL.* 
	FROM 
		[remoteServer].[remoteDBName].[dbo].[productExtended_feature] peETL WITH (NOLOCK)
		LEFT OUTER JOIN [LocalDBName].[dbo].[productExtended_feature] pePROD WITH (NOLOCK) ON peETL.id = pePROD.id
	WHERE pePROD.id IS NULL
	
		
--productExtended_image
INSERT INTO [LocalDBName].[dbo].[productExtended_image] 
	SELECT peETL.* 
	FROM 
		[remoteServer].[remoteDBName].[dbo].[productExtended_image] peETL WITH (NOLOCK)
		LEFT OUTER JOIN [LocalDBName].[dbo].[productExtended_image] pePROD WITH (NOLOCK) ON peETL.id = pePROD.id
	WHERE pePROD.id IS NULL
	
	
--productExtended_imageType
INSERT INTO [LocalDBName].[dbo].[productExtended_imageType] 
	SELECT peETL.* 
	FROM 
		[remoteServer].[remoteDBName].[dbo].[productExtended_imageType] peETL WITH (NOLOCK)
		LEFT OUTER JOIN [LocalDBName].[dbo].[productExtended_imageType] pePROD WITH (NOLOCK) ON peETL.id = pePROD.id
	WHERE pePROD.id IS NULL
	
	
--productExtended_similarProduct
INSERT INTO [LocalDBName].[dbo].[productExtended_similarProduct] 
	SELECT peETL.* 
	FROM 
		[remoteServer].[remoteDBName].[dbo].[productExtended_similarProduct] peETL WITH (NOLOCK)
		LEFT OUTER JOIN [LocalDBName].[dbo].[productExtended_similarProduct] pePROD WITH (NOLOCK) ON peETL.id = pePROD.id
	WHERE pePROD.id IS NULL
	

--productExtended_specValue
INSERT INTO [LocalDBName].[dbo].[productExtended_specValue] 
	SELECT peETL.* 
	FROM 
		[remoteServer].[remoteDBName].[dbo].[productExtended_specValue] peETL WITH (NOLOCK)
		LEFT OUTER JOIN [LocalDBName].[dbo].[productExtended_specValue] pePROD WITH (NOLOCK) ON peETL.id = pePROD.id
	WHERE pePROD.id IS NULL
	
		
--productExtended_specOption
INSERT INTO [LocalDBName].[dbo].[productExtended_specOption] 
	SELECT peETL.* 
	FROM 
		[remoteServer].[remoteDBName].[dbo].[productExtended_specOption] peETL WITH (NOLOCK)
		LEFT OUTER JOIN [LocalDBName].[dbo].[productExtended_specOption] pePROD WITH (NOLOCK) ON peETL.id = pePROD.id
	WHERE pePROD.id IS NULL
	
	
-- productExtended
INSERT INTO [LocalDBName].[dbo].[productExtended] 
	SELECT peETL.* 
	FROM 
		[remoteServer].[remoteDBName].[dbo].[productExtended] peETL WITH (NOLOCK)
		LEFT OUTER JOIN productExtended pePROD WITH (NOLOCK) ON peETL.id = pePROD.id
	WHERE pePROD.id IS NULL