Re: [sqlite] Suggestion for sqlite shell
On Mon, Jul 12, 2010 at 5:00 PM, Alexey Pechnikovwrote: > Maxim, please show example here and the link to your implementation. > > Alexey, to illustrate I prepared a screen shot http://www.maxerist.net/downloads/temp/bind_iterate.png excel and cells to be copied are at the top, at the center the query, the dialog ask for the user confirmation and the results are below. It's just an example of complex data manipulation "on the fly" with this feature, the code itself is very simple as you may see from the input and output. Knowing that sqlite shell already can parse csv content, I think this feature will require no more than a couple of hundred lines of code Max ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Suggestion for sqlite shell
Maxim, please show example here and the link to your implementation. -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Suggestion for sqlite shell
Hi, recently I implemented a feature for an gui admin I use internally, but I think it would be useful also for sqlite shell. Sorry if it already exists in some form, I could not find similar. The idea is to use bind syntax together with csv (or clipboard compatible) import. So if one enters a query with question marks and other symbols that allows parameters numbering (but not naming obviously) and also provides csv file, shell will allow to interate through each row of the file and perform the query using the row as the parameters set. It will allow not only using a complex inserts with concatenation and so on but also give the ability to make mass updates or other conditional operations. There are errors possible like conflict between expected number of parameters and provided, but this could be resolved either with returrning an error (% expected, but % found) or allowing ignoring extra fields with padding. I don't know whether the clipboard content can be used in sqlite ideologically, but in my case it saved additional time allowing importing for example from excel without the intermediate file (csv). Thanks Max Vlasov www.maxerist.net ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users