Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-22 Thread Stephen Chrzanowski
On Wed, Mar 22, 2017 at 9:30 AM, R Smith wrote: > > On 2017/03/22 9:53 AM, Eric Grange wrote: > >> For the sake of curiosity, is anyone (as in any human) using RIGHT JOIN? >> >> Personally I never had a need for a RIGHT JOIN, not because of theoretical >> or design

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-22 Thread Dominique Devienne
On Wed, Mar 22, 2017 at 1:33 PM, Clemens Ladisch wrote: > Dominique Devienne wrote: > > On Wed, Mar 22, 2017 at 12:52 PM, R Smith wrote: > >> There is no way to easily implement an automatic view-of-table > >> dropper. (I've tried to do something like

Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-22 Thread Hick Gunter
Since LEFT JOIN and RIGHT JOIN while also swapping the tables are interchangeable, why should this not work? SELECT ... FROM clients LEFT JOIN ON ... ( suppliers LEFT JOIN stock ON ...) WHERE ...; -Ursprüngliche Nachricht- Von: sqlite-users

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-22 Thread Simon Slavin
On 22 Mar 2017, at 11:52am, R Smith wrote: > > May I add further that views are tricky things. They can refer to multiple > tables, or other views which in turn refer to multiple tables or yet other > views (and have obscured the names of the original tables via "AS"

Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-22 Thread R Smith
On 2017/03/22 4:14 PM, Hick Gunter wrote: Since LEFT JOIN and RIGHT JOIN while also swapping the tables are interchangeable, why should this not work? SELECT ... FROM clients LEFT JOIN ON ... ( suppliers LEFT JOIN stock ON ...) WHERE ...; HI Gunter, They are interchangeable for 1 vs. 1

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-22 Thread Jean-Luc Hainaut
On 22/03/2017 11:33, 邱朗 wrote: Hi, Is there any way to drop view “automatically” when its associated table is dropped? It seems no way to do. Then if I drop a table, is there any (easy) way to find views created based on it and I can drop view manually ? A quick and dirty procedure:

Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-22 Thread Darren Duncan
Unless I misunderstand the desired result, this query would be better formulated using 2 left joins instead, like this: SELECT ... FROM Persons LEFT JOIN Pets ... LEFT JOIN PetAccessories ... -- Darren Duncan On 2017-03-22 2:22 AM, Chris Locke wrote: An interesting discussion of it on

Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-22 Thread David Raymond
Just to be sure, have you actually checked your right join syntax on a system that supports it? Because I don't think what you have written there will actually achieve what you think it will. There is no three-way join operator that will perform a left and a right join . No matter how you word

[sqlite] Memoization in sqlite json1 functions

2017-03-22 Thread Domingo Alvarez Duarte
Hello Richard ! I noticed that sqlite do not use any memoization in json1 functions. For example jsonExtractFunc and others parse the json string every time it's called even when the json string is the same. minimal example : "select json_extract(json, '$.name') name, json_extract(json,

[sqlite] Possibly pointless assert

2017-03-22 Thread Scott Robison
Take a look at http://www.sqlite.org/cgi/src/artifact/3ed64afc49c0a222?ln=2214,2233 (especially the assert within). I may not be understanding something, but that assert seems pointless to me. The point of the loop is to check all the columns in an index to see if they are all binary collated.

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-22 Thread 邱朗
“Much safer to have a habit to name views like the table names they derive from (when they derive from specific tables)” That is what I am doing right now. So thanks for all the answers I got to confirm that there is no easy way to do it. Qiulang At 2017-03-22 19:52:59, "R Smith"

Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-22 Thread Vladimir Vissoultchev
You don't need derived tables, just use brackets for explicitly order the execution of JOIN operators like this: SELECT P.PersonName , Pt.PetName , Pa.AccessoryName FROMPersons P LEFT JOIN ( Pets Pt JOINPetAccessories Pa

[sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-22 Thread 邱朗
Hi, Is there any way to drop view “automatically” when its associated table is dropped? It seems no way to do. Then if I drop a table, is there any (easy) way to find views created based on it and I can drop view manually ? Thanks Qiulang ___

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-22 Thread Richard Hipp
On 3/22/17, 邱朗 wrote: > Hi, > > > Is there any way to drop view “automatically” when its associated table is > dropped? > It seems no way to do. Then if I drop a table, is there any (easy) way to > find views created based on it and I can drop view manually ? > There is no

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-22 Thread R Smith
On 2017/03/22 12:37 PM, Richard Hipp wrote: On 3/22/17, 邱朗 wrote: Hi, Is there any way to drop view “automatically” when its associated table is dropped? It seems no way to do. Then if I drop a table, is there any (easy) way to find views created based on it and I can

Re: [sqlite] Please help to create a connection to SQLite database!

2017-03-22 Thread Clemens Ladisch
Evgeniy Buzin wrote: > "Settings "Prism.Mvvm.ViewModelLocator.AutoWireViewModel" property has > called exception...". That "..." contains relevant information. > System.Windows.Markup.XamlParseException > > What is the reason of this error? Something related with XAML parsing. So not related

Re: [sqlite] Help with establishing a connection on NS3 and sqlite DB

2017-03-22 Thread Dan Kennedy
On 03/22/2017 05:58 AM, Ausama Majeed wrote: Hello guys, I am trying to do a connection between a database created with Sqlite and my application in ns3. the sqlite engine is installed on ubuntu 16.04 machine and the output is enabled with ns3.26. I cann't do a simple select query from ns3,

Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-22 Thread Chris Locke
An interesting discussion of it on StackOverflow... http://stackoverflow.com/questions/689963/does-anyone-use-right-outer-joins To give one example where a RIGHT JOIN may be useful. Suppose that there are three tables for People, Pets, and Pet Accessories. People may optionally have pets and

Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-22 Thread Eric Grange
For the sake of curiosity, is anyone (as in any human) using RIGHT JOIN? Personally I never had a need for a RIGHT JOIN, not because of theoretical or design considerations, but it just never came into my flow of thought when writing SQL... I guess some automated SQL query generators could use

[sqlite] SQLite and LINQ in C#

2017-03-22 Thread Florian Lorenzen
Hello, I tried to use System.Data.SQLite together with LINQ (LINQ-to-SQL that is). Basically, I had the following classes: class MsgDatabase : DataContext { public MsgDatabase(IDbConnection connection) : base(connection) { } public readonly Table Msg = null; } } [Table]

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-22 Thread Clemens Ladisch
Dominique Devienne wrote: > On Wed, Mar 22, 2017 at 12:52 PM, R Smith wrote: >> There is no way to easily implement an automatic view-of-table >> dropper. (I've tried to do something like this for an sqlite tool long ago). > > Yes but... You can run a simple query on the view,

Re: [sqlite] Drop view “automatically” when its associated table is dropped?

2017-03-22 Thread Dominique Devienne
On Wed, Mar 22, 2017 at 12:52 PM, R Smith wrote: > On 2017/03/22 12:37 PM, Richard Hipp wrote: > >> On 3/22/17, 邱朗 wrote: >> >>> Is there any way to drop view “automatically” when its associated table >>> is dropped? >>> >>> There is no easy way to

Re: [sqlite] RIGHT JOIN! still not supported?

2017-03-22 Thread R Smith
On 2017/03/22 9:53 AM, Eric Grange wrote: For the sake of curiosity, is anyone (as in any human) using RIGHT JOIN? Personally I never had a need for a RIGHT JOIN, not because of theoretical or design considerations, but it just never came into my flow of thought when writing SQL... I guess