Re: [sqlite] How can I detect rows with non-ASCII values?

2020-01-18 Thread Richard Damon
On 1/18/20 3:21 AM, Rocky Ji wrote: Hi, I am asked to highlight rows containing strange characters. All data were ingested by a proprietary crawler. By strange, I mean, question marks, boxes, little Christmas Trees, solid arrows, etc. kind of symbols; these appear suddenly in flow of normal

Re: [sqlite] sqlite3_limit equivalent in System.Data.SQLite.dll

2020-01-18 Thread Joe Mistachkin
Keith Bertram wrote: > > Do you have an estimated time for this release? > If everything goes as planned, right around the third week of February. -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] To edit in sqlite3 CLI multiline SQL statements?

2020-01-18 Thread Keith Medcalf
While there are lines to be edited: Press up arrow until line is recalled Edit the line Press the ENTER key to enter that line Maybe you have to compile your own to include readline (on Linux), but it works for me. Both Linux and Windows. -- The fact that there's a Highway to Hell but

Re: [sqlite] To edit in sqlite3 CLI multiline SQL statements?

2020-01-18 Thread Simon Slavin
On 18 Jan 2020, at 9:30pm, Csanyi Pal wrote: > can one edit a multiline SQL statement in the sqlite3 CLI? No. But if you make a multiline SQL statement in a text file you can paste it into the CLI all in one operation. ___ sqlite-users mailing list

Re: [sqlite] Can it (should it) be done in SQL?

2020-01-18 Thread Keith Medcalf
Ooops. Wrong query pasted, should be this one: with p (period) as ( values (cast(strftime('%m') as integer)) ), unks (period, type, amount) as ( select p.period, 'UNK', ( select sum(amount) from goals

[sqlite] To edit in sqlite3 CLI multiline SQL statements?

2020-01-18 Thread Csanyi Pal
Hello, can one edit a multiline SQL statement in the sqlite3 CLI? Say I entered the following multiline SQL statement: sqlite> SELECT 1 UNION ALL ...> SELECT 2 UNION ALL ...> SELECT 3 ...> ; Then after a while I want to run it again, then how can I use the bash history to get back

Re: [sqlite] Can it (should it) be done in SQL?

2020-01-18 Thread Keith Medcalf
Mayhaps like this? CREATE TABLE Goals ( period integer primary key, amount integer not null ); CREATE TABLE Data ( period integer not null references Goals(period), type text not null, amount integer not null ); create index Data_Period on Data (period); INSERT INTO Goals

[sqlite] Can it (should it) be done in SQL?

2020-01-18 Thread David Bicking
I suspect the answer is that it is best to do this in the application program. However, the platform I want to use is dumb as a brick. It basically can call sqlite3_get_table, mildly reformat the data and send it to the display. Anyway, there are two tables CREATE TABLE Goals (period integer

Re: [sqlite] How can I detect rows with non-ASCII values?

2020-01-18 Thread Keith Medcalf
If we are talking the later case, and the 'text' field contains text in Windows MBCS then you can use, for example: for row in db.execute('select cast(mbcsfield as blob) from table'): textfield = row[0].decode('mbcs') to recover proper unicode text. If the encoding is not 'mbcs' substitute

Re: [sqlite] How can I detect rows with non-ASCII values?

2020-01-18 Thread Simon Slavin
On 18 Jan 2020, at 12:12pm, Rocky Ji wrote: > By question marks, I meant- that some text, like Dutch programmers names, and > address in Nordic locations, have accents and umaults and other such > modifications done to English-alphabets. These get displayed as ? or box SQLite doesn't display

Re: [sqlite] How can I detect rows with non-ASCII values?

2020-01-18 Thread Keith Medcalf
On Saturday, 18 January, 2020 05:21, Rocky Ji wrote: >> > GLOB supports character classes >thanks for teaching new keyword and its use. >My first attempt was very similar to what you suggest, except I used >sqlite3 and re from inside Python. >But as you see, I can't reliably seprate

Re: [sqlite] How can I detect rows with non-ASCII values?

2020-01-18 Thread Keith Medcalf
On Saturday, 18 January, 2020 05:13, Rocky Ji wrote: >Sorry for lack of clarity. >By question marks, I meant- that some text, like Dutch programmers names, >and address in Nordic locations, have accents and umaults and other such >modifications done to English-alphabets. These get displayed as

Re: [sqlite] How can I detect rows with non-ASCII values?

2020-01-18 Thread Rocky Ji
> > > GLOB supports character classes thanks for teaching new keyword and its use. My first attempt was very similar to what you suggest, except I used sqlite3 and re from inside Python. But as you see, I can't reliably seprate 'interrogative' question marks from question marks that get

Re: [sqlite] How can I detect rows with non-ASCII values?

2020-01-18 Thread Rocky Ji
Sorry for lack of clarity. By question marks, I meant- that some text, like Dutch programmers names, and address in Nordic locations, have accents and umaults and other such modifications done to English-alphabets. These get displayed as ? or box On Sat, Jan 18, 2020, 16:34 Clemens Ladisch

Re: [sqlite] How can I detect rows with non-ASCII values?

2020-01-18 Thread Clemens Ladisch
Rocky Ji wrote: > I am asked to highlight rows containing strange characters. All data were > ingested by a proprietary crawler. > > By strange, I mean, question marks, boxes, little Christmas Trees, solid > arrows, etc. kind of symbols; these appear suddenly in flow of normal ASCII > English

[sqlite] How can I detect rows with non-ASCII values?

2020-01-18 Thread Rocky Ji
Hi, I am asked to highlight rows containing strange characters. All data were ingested by a proprietary crawler. By strange, I mean, question marks, boxes, little Christmas Trees, solid arrows, etc. kind of symbols; these appear suddenly in flow of normal ASCII English letters. How do I