Hello,
I am trying to do an UPDATE of one table based on the aggregate
results of the different table. How can I do it in SQlite please?

Background problem: Table1 contains many different values of different
file names. I've created view (table2) which provides me information
how many file names of the same name are included (SELECT +
COUNT+GROUP BY FILENAME) and now I am trying to put this information
back to the original table to the particular column via UPDATE
statement.

Something like: UPDATE table1 SET duplicates=table2.count FROM table2
WHERE table1.filename=table2.filename

How can I do it with Sqlite, please?

BTW: I don't want to do it via two selects+join because this operation
will be preformed many times and so I would like to be able to update
one particular column only once.

Many thanks.

Petr
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to