From 169678198051c4195579bbd011476233983fda66 Mon Sep 17 00:00:00 2001
From: Paul Duncan <pabs@pablotron.org>
Date: Sat, 19 Mar 2022 03:49:48 -0400
Subject: dbstore: lots of small fixes

---
 dbstore/sql/cpe-match/insert-name.sql | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'dbstore/sql/cpe-match/insert-name.sql')

diff --git a/dbstore/sql/cpe-match/insert-name.sql b/dbstore/sql/cpe-match/insert-name.sql
index adc99f4..ebdb638 100644
--- a/dbstore/sql/cpe-match/insert-name.sql
+++ b/dbstore/sql/cpe-match/insert-name.sql
@@ -1,5 +1,4 @@
-INSERT INTO cpe_match_cpes(
-  cpe_match_id,
-  cpe_id,
-  cpe22_uri
-) VALUES (?, (SELECT cpe_id FROM cpes WHERE cpe23 = ?), ?);
+INSERT INTO cpe_match_cpes(cpe_match_id, cpe_id, cpe22_uri)
+  SELECT ?, cpe_id, ?
+    FROM cpes
+   WHERE cpe23 = ?;
-- 
cgit v1.2.3

