Hello,
Is it possible to create a view which switches rows and columns of a
dynamically changing table?
For example, imagine we have table t1 where both columns and rows could
change after the view has been created
sqlite> select * from t1;
Product/Region|Belgium|France|USA
Oil_filter|1|2|3
Spar
On 31 Mar 2019, at 9:07pm, Shane Dev 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
> Dear colleagues
>
> I detected an unexpected behaviour in sqlite3 (CLI) that I consider a bug as
> it seems not documented.
>
> When using an init file (even if an empty file), sqlite3 outputs an extra
> empty line to stdout. This messes up parsing of the sqlite3 output, as this
> line is
If by "a dynamically changing table " you mean that any data change (not
schema change) in t1 will propagate to v1, and if the set of Product
values doesn't change, then you can try this:
create table t1(Product,Belgium,France,USA);
insert into t1 values
('OilFilter',1,2,3),('SparkPlug',4,5,6)
On Sunday, 31 March, 2019 14:07, Shane Dev wrote:
>Is it possible to create a view which switches rows and columns of a
>dynamically changing table?
>For example, imagine we have table t1 where both columns and rows
>could change after the view has been created
>sqlite> select * from t1;
>Prod
Works fine for me on Centos ... using the default (ancient) version of SQLite3
# sqlite3 /tmp/test.db "CREATE TABLE test (col1); INSERT INTO test VALUES(1);"
# touch /tmp/test.init
# sqlite3 /tmp/test.db "SELECT * FROM test;" 2>/dev/null
1
# sqlite3 -init /tmp/test.init /tmp/test.db "SELECT * FRO
On Tue, 19 Mar 2019 at 07:35, Dan Kennedy wrote:
>
> Now fixed here:
>
>https://sqlite.org/src/info/45c73deb440496e8
From that diff, it seems that you changed the documentation of the
function's parameters where the function was defined (see fts5_hash.c
line 489 at the right) but not where th
Hi Keith, Jean-Luc
I should have mentioned my shell is configured to display column headers
Product/Region|Belgium|France|USA for table t1 and
Product/Region|Oil_filter|Spark_plug|Coolent for view v1. By "dynamically
changing table", I meant the number of columns and rows could could change
after
8 matches
Mail list logo