Showing results for 
Search instead for 
Did you mean: 

Result Table in SQLite




I was wondering why a SQLite.sql(table,sqlString) statement with a sqlString  as the following  one 'select * from <table> with rowId > <number>' will give back tables with different column format types depending on the first row in the result table.


Attachment shows two tables. Left one is

Select * from <table> where rowId >= 2

right one is

Select * from <table> where rowId >= 1


The format of the columns is different. Why is that?

I have read the documentation and it says the format depends on the select. But in my opinion the format should be the same. As you can see in the attachment, the reals and integer values are no longer displayed because the column is formated as string.


Second thing I am wondering is, that the Real1 and Real2 columns in the right table have 0.00 where the Integer1 and Integer2 columns are emtpy (=void). In my opinion, the Integer columns are right, because if there is no value, than it has to be null which for me is equal to void but not equal 0.00. Even if writing an empty cell which is formated to real or integer will result in 0.


Maybe I am mistaken and I will understand it when someone explains it to me.


Thanks in advance.


Re: Result Table in SQLite

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Jan,


the datatype type is set according to the content of the first row.


Only the first row contains data for every column so if you skip the first row the data type will be set to the default of type string for all the empty cells in the first row.


Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.