SQLite returns unwanted column header

My column is “Items”. When I select for “Items” rows, the first row returned is “Items”. How can I remove, or better yet, never see it?

set return header to false


Taifun

Thank-you for your reply. :smile:

I’ve already tried that. Made no difference. It is not set in the Designer, so it shouldn’t ever be an issue unless you WANT to include the header. :thinking:

From the docs, which I did look at: :slightly_smiling_face:

Return Header
Boolean Default: false
Returns whether the header row should be returned in the result of a Select statement.

I note other non-Kodular SQLite extensions do NOT include the column name with the select results. :face_with_raised_eyebrow: I decided against those extensions for other reasons.

you might want to try to set it in the blocks…

in case this does not help you might want to provide a screenshot and a test example as small as possible, which elicits this issue, so someone from the Kodular team can fix this bug

Taifun

If your return is a list where you don’t want the first item, loop and start with item 2 and create a new list with those items.

OK, I created an example with an SQLite1.Query “query” select statement for “name” and one for “name” & “tel”. I included an SQLite1.Query for comparison. Here are the blocks:


I’ve included the .aia file as well.
SQLite_Kodular_Test.aia (5.5 KB)

I included the “SQLite1.Return Header” set to false in the blocks; results made no difference with or without it.

Here are the results of pressing “Run SQL Select”:

(name Fred Flintstone)
(name,tel Fred Flintstone, 123-456-7890)
((Fred Flintstone 123-456-7890))

As you can see, the column names are included in the results from the select statements. The default should be no column names included unless SQLite.Return Header is set to true.

Take the result and delete the field names.

Only use values ​​that are different from your field names. Or, if you do a Select with N fields, start the N + 1 loop.

@Kodular please add this onto your bug list to fix
thank you

Taifun

Thanks for your reply. :grinning:

I get around it by using these blocks to remove the column headers:

However, IMHO :sunglasses:, I shouldn’t have to do this, because the SQLite1.Return Headers function should work as expected. :thinking:

Taifun asked the staff to check.

this workaround looks very cumbersome…
learn to work with lists… i.e. convert the result into a list of lists and remove the first row to get the result you like to have…

Taifun

1 Like

I have used following query to remove column names from Mysql data and not have tried it with sql litel… Try if it can help.