INSERT INTO TextTable(Number, Tokens)
SELECT
(SELECT ID FROM Tureme WHERE leksem IN
(SELECT Tokens FROM Text)),
(SELECT Tokens FROM Text WHERE Tokens IN
(SELECT leksem FROM Tureme));
TextTable has two columns-> Number,Tokens Tureme has two columns -> ID(Primary Key), leksem and Text has one column -> Tokens
My tables:
TextTable is empty.
What I'm trying to do is inserting the results of these subqueries into TextTable. The subqueries works perfect individually. But, when I run it together, it doesn't insert results of subqueries and it gives an error saying:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. The statement has been terminated.
What should i do?
First subquery returns: Second subquery returns:
ID Tokens
4 apple
6 melon
9 pear
I want to populate TextTable with these values.