# Multiple queries postgresql

**URL:** <https://discourse.nodered.org/t/multiple-queries-postgresql/90438>\
**Category:** General\
**Created:** [26 August 2024 08:58 UTC](https://discourse.nodered.org/t/multiple-queries-postgresql/90438 "2024-08-26T08:58:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SergioRT](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sergiort/32/19289_2.png) [@SergioRT](https://discourse.nodered.org/u/SergioRT)\
**Post date:** [26 August 2024 08:58 UTC](https://discourse.nodered.org/t/multiple-queries-postgresql/90438/1 "2024-08-26T08:58:26Z")

</div>

Hello everyone

I am trying to perform multiple queries with the node-red-contrib-postgresql node.  
So I construct an array of queries "insert into" and send it to the node postgresql.  
It is clearly indicated in the manual that it is possible but I can't do it.  
Does anyone have a clue ?

Thanks

---

<div class="post-metadata">

**Author:** ![lebao](https://avatars.discourse-cdn.com/v4/letter/l/59ef9b/32.png) [@lebao](https://discourse.nodered.org/u/lebao)\
**Post date:** [26 August 2024 09:34 UTC](https://discourse.nodered.org/t/multiple-queries-postgresql/90438/2 "2024-08-26T09:34:46Z")

</div>

Hello,

Could you provide a more specific question? I can give you an example like this:

```sql
INSERT INTO "Downlinktype5"."Gsheet"(
	id, "MSSV", "Name", "Day_of_birth", "Class")
	VALUES ($1, $2, $3, $4, $5);

```

The input is `msg.params`. Note that `msg.params` is an array, and the order in the array must correspond to the order of the columns.

---

<div class="post-metadata">

**Author:** ![SergioRT](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sergiort/32/19289_2.png) [@SergioRT](https://discourse.nodered.org/u/SergioRT)\
**Post date:** [26 August 2024 15:57 UTC](https://discourse.nodered.org/t/multiple-queries-postgresql/90438/3 "2024-08-26T15:57:23Z")

</div>

Hello

Thanks for your interest !  
I am trying to execute multiple queries in order to import XLS file.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/e/ee87f401ecdf9a98b19fc16bdc37c3693fb8a77e.png)  
The function "req" exit many sql queries "insert into".  
How can I control postgresql node to execute all queries ?  
I tried to use the outputs msg.tick and msg.complete from node postgresql

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 November 2024 15:57 UTC](https://discourse.nodered.org/t/multiple-queries-postgresql/90438/4 "2024-11-24T15:57:31Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
