On 12/17/2010 4:36 AM, Sumedh wrote: > I am using C API > I am using sqlite3_column_type to determine, the type of column as it is > requirement for me to decide whether to return the value as string or > number. It works well, but not in case when i use left outer join. > > When i use left outer join, the column type returned is always NULL > irrespective of the actual column type
What do you mean by "actual column type"? sqlite3_column_type returns the type of the *value* stored in a given column in the current row. Unlike many other database systems, SQLite can store a value of any type in any column. Values of different types may appear in the same column, in different rows. A value NULL is of type NULL. It's clearly not a string nor an integer. That's what sqlite3_column_type is telling you. > For example > > SELECT a.col1, a.col2, b.col3, b.col4 FROM table1 a LEFT OUTER JOIN table2 > b ON a.col1=1; Is table2 empty, by any chance? -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users