How to compare two msg.payload in a same flow

So do what i said...

MIC --> Speech to text --> Function node (as above - to generate a SQL with WHERE clause) --> done!

How it should work...

  1. get MIC data

  2. convert to text

  3. generate a SQL statement (with a WHERE clause set to the converted text) and pass it out in msg.topic to the DATABASE node
    e.g. SELECT TOP 1 * from MY_TABLE WHERE VOICE = 'hello hello hello'"

  4. DATABASE node gets only 1 row - IF FOUND! (otherwise you get nothing back from the database meaning is WASNT FOUND)

This means there is NO NEED to search for text in node-red - SQL does that through the WHERE clause. Delete the JOIN node, and comparison methods - they are not necessary.

Do you understand?