# Possible solution for split-choose-insert into DB

**URL:** <https://discourse.nodered.org/t/possible-solution-for-split-choose-insert-into-db/22150>\
**Category:** Share Your Projects\
**Created:** [23 February 2020 15:08 UTC](https://discourse.nodered.org/t/possible-solution-for-split-choose-insert-into-db/22150 "2020-02-23T15:08:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbuurman](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@gbuurman](https://discourse.nodered.org/u/gbuurman)\
**Post date:** [23 February 2020 15:08 UTC](https://discourse.nodered.org/t/possible-solution-for-split-choose-insert-into-db/22150/1 "2020-02-23T15:08:14Z")

</div>

Hi all,

Hereby a possible solution for:

receiving a msg from an external server  
change format into JSON  
split the msg  
choose which SQL statement has to be executed  
extract the statement from msg  
send it to a DB  
and show me the result

This project will be extended whit a soap server and dashboard (working on it)  
[msg-split-insert-db.json](https://discourse.nodered.org/uploads/short-url/at54DWUlTxVvjto4h1i5PvwTVy8.json) (3.9 KB)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 February 2020 15:43 UTC](https://discourse.nodered.org/t/possible-solution-for-split-choose-insert-into-db/22150/2 "2020-02-23T15:43:04Z")

</div>

Actually the Inject node at the start is injecting JSON (JSON is a string representation of an object) and the JSON node is converting it _from_ JSON to a javascript object.

---

<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:** [23 April 2020 15:08 UTC](https://discourse.nodered.org/t/possible-solution-for-split-choose-insert-into-db/22150/3 "2020-04-23T15:08:17Z")

</div>

This topic was automatically closed after 60 days. New replies are no longer allowed.
