[sqlite] TEST: please ignore and delete

2017-07-09 Thread Winfried
I'm just checking that the list is again reachable from Nabble after an admin changed the mail address from @sqlite.org to @mailinglists.sqlite.org http://sqlite.1065341.n5.nabble.com/ Admins: If need be, please delete this message later. -- View this message in context:

[sqlite] Windows app to read SQLite DB, and launch web browser when dbl-clicking a record?

2018-10-19 Thread Winfried
Hello, I have a bunch of hyperlinks in an SQLite database, and need to read each page for validation before deleting the record. To make it easier, the DB manager should launch the default web browser when I double click on a column that contains a hyperlink. Before I build a GUI, is there a

[sqlite] SQLite Windows GUI alternative to Excel?

2018-10-06 Thread Winfried
Hello, After reading this article… "In the workplace, spreadsheet experts face a constant barrage of help requests" https://www.wsj.com/articles/the-first-rule-of-microsoft-exceldont-tell-anyone-youre-good-at-it-1538754380 … I'd like to check if there is a Windows GUI available as a valid

Re: [sqlite] Simple way to import GPX file?

2018-12-09 Thread Winfried
Thanks to both of you. Problem solved :-) -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Simple way to import GPX file?

2018-12-09 Thread Winfried
Good call, thank you. For others' benefit: 1. Copy the file, open the copy in a text editor, use a regex to turn the data into tab-separated columns 2. Create a new file, and create the table: sqlite3 waypoints.sqlite sqlite> CREATE TABLE waypoints (name text, latitude text, longitude text, id

[sqlite] Simple way to import GPX file?

2018-12-09 Thread Winfried
Hello, I need to importe a GPX file that contains a few thousand waypoints, eg. Some name I tried https://mygeodata.cloud and https://geoconverter.hsr.ch, but for some reason, the "waypoints" table doesn't contain latitude + longitude infos. Before I write a Python script, is there a simple way

Re: [sqlite] Import XLS file?

2019-10-01 Thread Winfried
Simon Slavin-3 wrote > 1) export your XLS data in CSV format > 2) Use the SQLite shell tool to import the CSV data into your database Thanks. Is there a free (beer|speech) tool to convert an XLS file into CSV, for Windows or Linux that you would recommend? -- Sent from:

[sqlite] Import XLS file?

2019-10-01 Thread Winfried
Hello, I need to import an XLS file into SQLite. The web site doesn't seem to show how, and searching the archives here didn't help. FWIW, the data are in the file's first sheet, while other sheets only contain text

Re: [sqlite] Why does Python turn UTF8 data in SQLite into Latin1?

2019-11-12 Thread Winfried
Sorry. Windows 7 32 bits US + with French locale + Python 3.7.0. Turns out it had nothing to do with SQLite, and everything to do with Python's write(), which uses the default locale, so the following is required to output data as UTF-8 instead of cp1252 used on this computer:

[sqlite] Why does Python turn UTF8 data in SQLite into Latin1?

2019-11-11 Thread Winfried
Hello, For some reason, the following script turns UTF8 data in SQLite into Latin1: == import sqlite3 """ OK! sqlite3 mydb.sqlite .output check.from.sqlite.txt select * from table1; """ testoutput = open("check.from.Python.txt", "w") con = sqlite3.connect('mydb.sqlite')

[sqlite] Can SQLite import Latin1 data?

2019-11-15 Thread Winfried
Hello, I have a big CSV file that's encoded in Latin1 (cp1252), while SQLite stores strings as Unicode. Neither Google nor ".help" helped to find if SQLite offers a switch to convert Latin1 to UTF-8 on the fly before running the ".import" command. Should I first convert the file into UTF-8

Re: [sqlite] Can SQLite import Latin1 data?

2019-11-15 Thread Winfried
It's odd that SQLite doesn't support this, since it's not uncommun to have big Latin1 input files that can take a while to load in eg. Excel. For others' benefit, GNUWin32's iconv is very fast: "C:\Program Files\GnuWin32\bin\iconv.exe" -f "windows-1252" -t "UTF-8" "input.1252txt" >

Re: [sqlite] [Importing CSV] Empty colums != NULL?

2019-11-21 Thread Winfried
For other newbies' benefit: Yes, indeed, importing empty columns doesn't set them to NULL. UPDATE Shops SET "contact:postcode" = NULL WHERE "contact:postcode" = ""; UPDATE Shops SET "addr:postcode" = NULL WHERE "addr:postcode" = ""; SELECT name, IFNULL("contact:postcode","addr:postcode") zipcode

[sqlite] [Importing CSV] Empty colums != NULL?

2019-11-21 Thread Winfried
Hello, I imported data from a CSV file. Some of the columns are empty, so I expected them to be set to NULL, but it looks like it's not how SQLite handles them internally: = sqlite> .schema CREATE TABLE Shops( "id" TEXT, "name" TEXT, "contact:postcode" TEXT, "contact:city" TEXT,

[sqlite] [PHP+PDO] SELECT fails when using prepare + placeholder

2019-10-21 Thread Winfried
Hello, I can't figure out why PHP isn't happy with the following query: == prepare('INSERT INTO mytable (date, home_id, mode_id) VALUES (?, ?, ?)'); $query->execute(array($today,$home, $mode)); //CREATE TABLE mode (mode_id INTEGER, mode_txt TEXT); //SELECT OK //$query =

Re: [sqlite] [PHP+PDO] SELECT fails when using prepare + placeholder

2019-10-21 Thread Winfried
Zakrzewski, Jakub wrote > It's because `execute()` returns a boolean (as stated in the manual > https://www.php.net/manual/en/pdostatement.execute.php ). `fetch()` must > be called on `$query` Thanks much! = $query = $dbh->prepare("SELECT mode_txt FROM mode WHERE mode_id=? LIMIT 1");

[sqlite] Can SQLite do this in a single query?

2019-10-21 Thread Winfried
Hello, Before I dive into https://www.sqlitetutorial.net, I'd like to check with experienced users whether SQLite is up to the task, or I should maybe run multiple queries possibly with some help from PHP. Using the following tables, I need to find how employees from each city come to work.

Re: [sqlite] Can SQLite do this in a single query?

2019-10-24 Thread Winfried
Thank you very much to all. There's no way I could have come up with those queries. Considering the wealth/complexity of SELECT even in SQLite, it seems a whole book could be written on just that command. https://www.sqlite.org/images/syntax/select-stmt.gif Is there a good book you would

Re: [sqlite] Can SQLite do this in a single query?

2019-10-24 Thread Winfried
Simon Slavin-3 wrote > https://sqlite.org/books.html Thanks. "You have to paint the output table yourself." "You still have to "paint the fence" yourself, though now the table data is not sparse, thus easier to paint" Looks like "paint" is DB lingo: Does it mean formatting the output after

Re: [sqlite] Can SQLite do this in a single query?

2019-10-25 Thread Winfried
Keith Medcalf wrote > Well, "paint" is to draw your output. Thank you. -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Can SQLite do this in a single query?

2019-10-22 Thread Winfried
Yes, I forgot the column mode_id in the Employee's table. Thanks, I'll read up on the features SQLite's SELECT has to offer. At worst, I'll just run a simpler query multiple times. https://www.sqlite.org/lang_select.html -- Sent from: http://sqlite.1065341.n5.nabble.com/

Re: [sqlite] How to search for fields with accents in UTF-8 data?

2017-06-21 Thread Winfried [via SQLite]
Thanks for the infos. __ If you reply to this email, your message will be added to the discussion below: http://sqlite.1065341.n5.nabble.com/How-to-search-for-fields-with-accents-in-UTF-8-data-tp96249p96294.html This email was sent by Winfried (via Nabble