aboutsummaryrefslogtreecommitdiff
path: root/dbstore/sql/cpe-match/insert-name.sql
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2022-03-19 03:49:48 -0400
committerPaul Duncan <pabs@pablotron.org>2022-03-19 03:49:48 -0400
commit169678198051c4195579bbd011476233983fda66 (patch)
tree690833dc970d055fdaa3124b554bc81be7d636a8 /dbstore/sql/cpe-match/insert-name.sql
parent122ca3016cdc12ff61b2c2e2edd8df9cf2a17dc4 (diff)
downloadcvez-169678198051c4195579bbd011476233983fda66.tar.bz2
cvez-169678198051c4195579bbd011476233983fda66.zip
dbstore: lots of small fixes
Diffstat (limited to 'dbstore/sql/cpe-match/insert-name.sql')
-rw-r--r--dbstore/sql/cpe-match/insert-name.sql9
1 files changed, 4 insertions, 5 deletions
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 = ?;