@@ -31,6 +31,20 @@ INSERT INTO barcodes.barcode_scans (barcode, scan_timestamp, sample_status, tech
31
31
SELECT ' 0364352596' , scan_timestamp, sample_status, technician_notes
32
32
FROM barcodes .barcode_scans
33
33
WHERE barcode = ' X00236845' ;
34
+
35
+ INSERT INTO ag .vioscreen_registry (account_id, source_id, sample_id, vio_id, deleted, registration_code)
36
+ WITH temp_1 AS (
37
+ SELECT vr .account_id , vr .source_id , vr .vio_id , vr .deleted , vr .registration_code
38
+ FROM ag .vioscreen_registry vr
39
+ INNER JOIN ag .ag_kit_barcodes akb ON vr .sample_id = akb .ag_kit_barcode_id
40
+ WHERE akb .barcode = ' X00236845'
41
+ ),
42
+ temp_2 AS (
43
+ SELECT ag_kit_barcode_id
44
+ FROM ag .ag_kit_barcodes
45
+ WHERE barcode = ' 0364352596'
46
+ )
47
+ SELECT temp_1 .account_id , temp_1 .source_id , temp_2 .ag_kit_barcode_id , temp_1 .vio_id , temp_1 .deleted , temp_1 .registration_code FROM temp_1, temp_2;
34
48
-- End copying X00236845 to 0364352596
35
49
36
50
-- Begin copying 000031307 to 0364406520
@@ -61,4 +75,18 @@ INSERT INTO barcodes.barcode_scans (barcode, scan_timestamp, sample_status, tech
61
75
SELECT ' 0364406520' , scan_timestamp, sample_status, technician_notes
62
76
FROM barcodes .barcode_scans
63
77
WHERE barcode = ' 000031307' ;
78
+
79
+ INSERT INTO ag .vioscreen_registry (account_id, source_id, sample_id, vio_id, deleted, registration_code)
80
+ WITH temp_1 AS (
81
+ SELECT vr .account_id , vr .source_id , vr .vio_id , vr .deleted , vr .registration_code
82
+ FROM ag .vioscreen_registry vr
83
+ INNER JOIN ag .ag_kit_barcodes akb ON vr .sample_id = akb .ag_kit_barcode_id
84
+ WHERE akb .barcode = ' 000031307'
85
+ ),
86
+ temp_2 AS (
87
+ SELECT ag_kit_barcode_id
88
+ FROM ag .ag_kit_barcodes
89
+ WHERE barcode = ' 0364406520'
90
+ )
91
+ SELECT temp_1 .account_id , temp_1 .source_id , temp_2 .ag_kit_barcode_id , temp_1 .vio_id , temp_1 .deleted , temp_1 .registration_code FROM temp_1, temp_2;
64
92
-- End copying 000031307 to 0364406520
0 commit comments