# Help with Sqlite Select clause

**URL:** <https://discourse.nodered.org/t/help-with-sqlite-select-clause/19919>\
**Category:** General\
**Created:** [5 January 2020 05:21 UTC](https://discourse.nodered.org/t/help-with-sqlite-select-clause/19919 "2020-01-05T05:21:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![NODE777](https://avatars.discourse-cdn.com/v4/letter/n/7993a0/32.png) [@NODE777](https://discourse.nodered.org/u/NODE777)\
**Post date:** [5 January 2020 05:21 UTC](https://discourse.nodered.org/t/help-with-sqlite-select-clause/19919/1 "2020-01-05T05:21:55Z")

</div>

Hi  
This is my first time working with Sqlite.  
I'm trying to test clauses and the SELECT clause to read just 3 columns give me Sintax error near FROM .  
I've attached the flow.  
[SQLITE test.txt](https://discourse.nodered.org/uploads/short-url/nM2eAqnBusJa7TdbLDMWdTP5hmE.txt) (4.0 KB)  
Thank you very much for some help.

---

<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:** [5 January 2020 08:01 UTC](https://discourse.nodered.org/t/help-with-sqlite-select-clause/19919/2 "2020-01-05T08:01:25Z")

</div>

We don't need to see the flow, not yet anyway. Add a debug node showing the input to the SQL node, set it to show the complete message. Also add a debug node showing the output of the SQL node. Show us what they show.  
For the future it is better to paste flows and data inline here.

---

<div class="post-metadata">

**Author:** ![NODE777](https://avatars.discourse-cdn.com/v4/letter/n/7993a0/32.png) [@NODE777](https://discourse.nodered.org/u/NODE777)\
**Post date:** [5 January 2020 20:27 UTC](https://discourse.nodered.org/t/help-with-sqlite-select-clause/19919/3 "2020-01-05T20:27:39Z")

</div>

I did what you asked me and this is the debug tab when I push a SELECT clause.

I'm not quite sure if this what you need..... then push on inject node with the SELECT for some db columns is showed on sqlite in.

```auto
1/5/2020, 12:10:37 PMnode: sqlite IN
SELECT currentdate,currenttime, hp, FROM hvac; : msg.payload : number
2020-01-05T20:10:37.876Z

```

The output node at sqlite node does not appear on debug tab **and** the sqlite node debug tab is the following:

```auto
1/5/2020, 12:10:37 PMnode: Sqlite
msg : error
"Error: SQLITE_ERROR: near "FROM": syntax error"

```

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [5 January 2020 20:35 UTC](https://discourse.nodered.org/t/help-with-sqlite-select-clause/19919/4 "2020-01-05T20:35:38Z")

</div>

i think it may be the comma after hp.

---

<div class="post-metadata">

**Author:** ![NODE777](https://avatars.discourse-cdn.com/v4/letter/n/7993a0/32.png) [@NODE777](https://discourse.nodered.org/u/NODE777)\
**Post date:** [5 January 2020 20:39 UTC](https://discourse.nodered.org/t/help-with-sqlite-select-clause/19919/5 "2020-01-05T20:39:19Z")

</div>

@E1cid  
Yes men !!!! it does work.  
You made my day !!!  
Thank you so much. 😀

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [5 January 2020 20:42 UTC](https://discourse.nodered.org/t/help-with-sqlite-select-clause/19919/6 "2020-01-05T20:42:29Z")

</div>

not sure how your table is set up, but do you want all rows as you can set a limit.

the comma means it was expecting another column name. Thats why it threw a syntax error. It gave a clue, as it said the FROM threw the error.
