I need to an insert query to store a record on MS SQL Server. Once the insert query is successful, i need to run a select query to another table, based on the id (Primary key) of the newly inserted record from the first query.
It seems that i need use two mssql nodes for this purpose. And if i have to execute more queries sequentially, then i need to keep on adding new more mssql nodes.
Is there any way to only use a single mssql node and run different types of queries one after another? I would be really glad if anyone could help me to clear my confusions or misunderstandings.
First of all, thank you very much for the detailed explanation and also for guiding me to use node-red-contrib-mssql-plus in an efficient way. This is very helpful.
And yes there is infact no any harm in using multiple nodes. If it could be controlled, i just wanted to avoid occupying more flow area while defining nodes with same configuration.
But i have a better understanding now. Thank you very much.
Well, the config is set once & shared across all MSSQL-PLUS nodes.
However, if you mean you have same query and input parameters and want to re-use it, then the link call --> link in --> MSSQL --> link out (return mode) node is perfect for that...
Sorry, didn't maybe read your question very well but couldn't you simply do a combined SQL command with 2 statements. 1 to do the update and the 2nd to do the query? Does the SQL+ node allow that?