[sqlite] Update SQLITE
I have the following SQLITE query : SELECT BlokkeklaarAliasnaam, BlokkeklaarKultivar, sum(BlokkeklaarSkatting) FROM Blokkeklaar GROUP BY BlokkeklaarAliasnaam, BlokkeklaarKultivar; I cannot figure out how to update a column (i.e. BlokkeklaarSkattingKultAliasnaam) with the value of sum(BlokkeklaarSkatting) in the above statement. This refers to a single table. Regards ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQL to SQLite
Hi Simon My query is : UPDATE wbridge_history SET yearclass = ( SELECT D.wynklas FROM ( SELECT LidNo, PlaasNo, BlokNo, oesjaar, wynklas, ROW_NUMBER() OVER (PARTITION BY LidNo, PlaasNo, BlokNo, oesjaar ORDER BY COUNT(*) DESC, SUM(ton) DESC) AS row_num FROM wbridge_history GROUP BY LidNo, Plaasno, BlokNo, oesjaar, wynklas ) D WHERE D.LidNo = wbridge_history.LidNo AND D.PlaasNo = wbridge_history.PlaasNo AND D.BlokNo = wbridge_history.BlokNo AND D.oesjaar = wbridge_history.oesjaar AND D.row_num = 1 ); It works perfectly in SQL, but in SQLite it gives an error message : Error while executing SQL query on database 'weegbrugGeskiedenis': near "(": syntax error The squigly red line starts at (PARTITION .. Regards ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQL to SQLIte
I am having extreme difficulty to convert the above SQL query to SQLite. Can someone please help me. I need to udate the table using the most used text In a column for each row that has the same data. Regards ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users