This forum has been archived. All content is frozen. Please use KDE Discuss instead.

elaborated selection in queries

Tags: None
(comma "," separated)
User avatar
Robert Leleu
Registered Member
Posts
91
Karma
0

elaborated selection in queries

Sun Sep 09, 2012 10:06 am
Hi

Kubuntu 12.04, Kexi 2.4.0
I created a query whose SQL transcription is
Code: Select all
SELECT lieide.licleunik, lieide.idcleunik, lieide.ldcleunik, identite.nom, liens.trilien FROM lieide, identite, liens WHERE lieide.licleunik = 26 ORDER BY lieide.ldcleunik

it works fine

Within SQL view I elaborated it to
Code: Select all
SELECT lieide.licleunik, lieide.idcleunik, lieide.ldcleunik, identite.nom, liens.trilien FROM lieide, identite, liens WHERE lieide.licleunik = 26 OR lieide.licleunik = 33 ORDER BY lieide.ldcleunik

for which the "check" button says "OK"

but the data view crashes.

The reason for this trial is that I'm trying to build with Kexi an application giving the same possibilities as my previous Knoda app.
The heart of this app is the ability to "combine" (union, intersection, exclusion) selections previously made in a query, which I achieved handling Python sets and feeding the result to a new selection in the same query.

Is there any hope to have the possibility to use the SQL "OR" in a not too far future ?

Thanks
User avatar
Robert Leleu
Registered Member
Posts
91
Karma
0

Re: elaborated selection in queries

Sun Sep 09, 2012 1:18 pm
just to specify I want to be advised in case of answer
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS

Re: elaborated selection in queries

Sun Sep 09, 2012 11:56 pm
Dear Robert, I was unable to reproduce the bug. If you send me a test database with table, minimal amount of data and the query it will be easier to reproduce the bug. SQL "OR" should work already in SQL view (but not in Visual Design view) so any bugs like this have to be fixed quickly.


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help
User avatar
Robert Leleu
Registered Member
Posts
91
Karma
0

Re: elaborated selection in queries

Mon Sep 10, 2012 2:52 pm
I modified Simple_Database.kexi to Simple_Database1.kexi adding a 3d query named ownership whose sql read
Code: Select all
  SELECT cars.id, cars.model, ownership.id, ownership.owner, ownership.car, persons.id, persons.name, persons.age FROM ownership, persons, cars WHERE persons.id = ownership.owner AND cars.id = ownership.car ORDER BY ownership.id

and, in Simple_Database2.kexi added 4 as value in the select column for ownership.owner, giving
Code: Select all
SELECT cars.id, cars.model, ownership.id, ownership.owner, ownership.car, persons.id, persons.name, persons.age FROM ownership, persons, cars WHERE (cars.id = ownership.car AND persons.id = ownership.owner) AND (ownership.owner = 4) ORDER BY ownership.id
datas are displayed but on saving the query Kexi crashes, and the select value is no longer there when reopening
I modified this last code to
Code: Select all
SELECT cars.id, cars.model, ownership.id, ownership.owner, ownership.car, persons.id, persons.name, persons.age FROM ownership, persons, cars WHERE (cars.id = ownership.car AND persons.id = ownership.owner) AND (ownership.owner = 4 OR ownership.owner = 10) ORDER BY ownership.id

which checks good and was saved but crashes when requested to show datas. Reopening the databases the links are gone....

Where is the place to upload Simple_Database1.kexi ?
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS

Re: elaborated selection in queries

Mon Sep 10, 2012 10:29 pm
Robert Leleu wrote:Where is the place to upload Simple_Database1.kexi ?


I think you could zip it and send to the public list kexi@kde.org (registration at https://mail.kde.org/mailman/listinfo/kexi). The email will be archived and thus we can link it here. Total limit including the email body is 140KB.


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help
User avatar
Robert Leleu
Registered Member
Posts
91
Karma
0

Re: elaborated selection in queries

Tue Sep 11, 2012 9:15 am
file sent

edit (jstaniek): it's here: http://mail.kde.org/pipermail/kexi/2012 ... 00961.html


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]