Thank you very much for all your comments.

I thought about including all the columns in my view and then selecting
just what I need, but that is almost as painful as repeating the view's
query in adding the filters I want.  Modifying both the select clause and
the WHERE clause of the query is twice the work.  You see, I use the view
to quickly review the contents of multiple tables and whether they make
sense, and adding these extraneous, unformatted columns just makes the work
harder, that is why I did not just throw every column into the view.

I am familiar with CTE's, but I am not sure how they would help in this
situation.  I guess I could throw everything into my view and use that as a
CTE in a select, but all I have is that one complicated view, so creating a
CTE out of it seems like wasted effort.

I am intrigued by Dominique's suggestion of virtual tables and their hidden
column feature.  Enabling hidden columns in views would be the best of both
worlds - allow me to display exactly what I want while allowing me to
filter and sort on other columns.  Why don't normal tables and views have
hidden columns?  That would be an excellent enhancement to SQLite, I think.

In the meantime, copying the view's definition as a query and adding the
filtering and sorting clauses to the query gets me there.  It is a little
bit of work, but keeps my formatting so that I can scan each row quickly
and verify the data (which is the primary aim of my view).

Balaji Ramanathan

Reply via email to