On 31 Mar 2019, at 9:07pm, Shane Dev <devshan...@gmail.com> wrote:

> Is it possible to create a view which switches rows and columns of a 
> dynamically changing table?

Sorry, but no.  A VIEW is just a saved SELECT statement.  If you can't do it in 
a SELECT statement, you can't do it in a view.  And you can't do that.

What you're asking for – switching rows and columns – is not the way SQL looks 
at data.  Some SQL engines provide a custom function which does it (e.g. SQL 
Server) because of how difficult it is to do it without a special function.

For SQLite it's going to be easier to do it in your favourite programming 
language using SQL just to retrieve the data.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to