lundi 2 mars 2015

SQLite add blank 'alias' column to query

Using SQLite in VB.net project I had an SQL string that created (added) new columns on the fly when a data table was populated.



SQLString = "Select Column1, Column2, Null as 'NewColumn', column4 from Table


the above worked (for last 3 years) and allowed me to add temporary columns to a table without changing the Database structure. This was until SQLite DLL version 1.0.95.0. The above now causes the schema to be missing the key column which is column1. That is, the data is there but the table is not recognized as having a key column. Using alias columns still works, I can have



SQLString = "Select Column1, Column2, Column2 as 'NewColumn', column4 from Table


however Other then using a 'dedicated' Blank Column in the database to act as fillers for the newcolumn/s is there a way to do this?


Aucun commentaire:

Enregistrer un commentaire