Re: [sqlite] Result set column names

2019-12-07 Thread Simon Slavin
On 7 Dec 2019, at 11:09pm, J. King  wrote:

> It's stated here, at least:
> 

Also note

https://sqlite.org/pragma.html#pragma_short_column_names

https://sqlite.org/pragma.html#pragma_full_column_names

even though they are now both deprecated.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Result set column names

2019-12-07 Thread J. King
On December 7, 2019 6:04:36 p.m. EST, Tim Streater  
wrote:
>At various times in various threads on this list it has been stated
>that the column name in a result set is not guaranteed unless one uses
>AS. IOW, one should say
>
>  select abc as abc from mytable where i=23;
>
>rather than just:
>
>  select abc from mytable where i=23;
>
>I'm trying to find where on the SQLite website that is documented, if
>it is, so I can point someone at it. The Xojo documentation doesn't
>mwention this so either that is a potential problem for all us Xojo
>users or they've worked around it somehow in their SQLite wrapper.
>
>Thanks for a pointer.
>
>
>-- 
>Cheers  --  Tim
>___
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

It's stated here, at least:

-- 
J. King
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Result set column names

2019-12-07 Thread Tim Streater
At various times in various threads on this list it has been stated that the 
column name in a result set is not guaranteed unless one uses AS. IOW, one 
should say

  select abc as abc from mytable where i=23;

rather than just:

  select abc from mytable where i=23;

I'm trying to find where on the SQLite website that is documented, if it is, so 
I can point someone at it. The Xojo documentation doesn't mwention this so 
either that is a potential problem for all us Xojo users or they've worked 
around it somehow in their SQLite wrapper.

Thanks for a pointer.


-- 
Cheers  --  Tim
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Death of Hector Garcia-Molina

2019-12-07 Thread Jean-Luc Hainaut


Sad news: death of Hector Garcia-Molina, one of the pioneers in the 
field of distributed databases.


https://news.stanford.edu/2019/12/06/hector-garcia-molina-influential-computer-scientist-database-expert-dies-65/.

JLH
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] wal mode

2019-12-07 Thread MM
On Fri, 6 Dec 2019 at 19:06, Simon Slavin  wrote:

> On 6 Dec 2019, at 6:39pm, MM  wrote:
>
> > So it suffices that I run "PRAGMA journal_mode=WAL;" once from say the
> sqlite3 cli, for all future connections from any tool will use WAL mode for
> this database file?
>
> Correct.
>
> > What happens when 2 processes that have had their connection open for a
> while, attempt a UPDATE or INSERT INTO statement at the same time?
>
> It depends on which connections have a timeout set:
>
> 
>
> It is normal to specify a timeout of 10 seconds (or even 10 minutes) for
> every connection you open.  This means that a process which finds the
> database locked will enter a delay/retry loop for up to that amount of time
> before returning SQLITE_BUSY.
>
> However, note that the default timeout is zero.  Which means that if you
> don't set a timeout on a connection, and it encounters a locked database,
> it will immediately return SQLITE_BUSY without retrying.
>
> [The above explanation is simplified for clarity.]
> ___
>

Thank you.
After having set WAL mode, ontop of my db file, there will be 2 extra
files? At all times?
Up until, I used to scp the db file to another host, and sometimes work on
the db there and then copy back the db to the main host when no processes
are running.
Do I know simply copy the 3 files? the db file, and the 2 others?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] last occurrence of /*

2019-12-07 Thread x
It is possible using ‘with recursive’. The following is ugly and inefficient 
but might give you some ideas.

with recursive cte (x,str) as
(select 0,?1
union
select x-1,substr(?1,x-1) from cte limit length(?1))
select str from cte where substr(str,1,2)='/*' order by -x limit 1;




From: sqlite-users  on behalf of 
Bart Smissaert 
Sent: Friday, December 6, 2019 11:59:06 PM
To: SQLite mailing list 
Subject: Re: [sqlite] last occurrence of /*

I think it can be done.
Just dealing with the forward slash.

RBS

On Fri, Dec 6, 2019 at 11:49 PM Simon Slavin  wrote:

> On 6 Dec 2019, at 11:00pm, Bart Smissaert 
> wrote:
>
> > How do I select the part of this statement starting with the last /*  ?
>
> Not in SQLite.  Do it in your code, or write your own function to do it
> and load this function into SQLite.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users